---
openapi: 3.0.3
info:
  title: Elasticsearch Serverless API
  license:
    name: Apache 2.0
    url: https://github.com/elastic/elasticsearch-specification/blob/main/LICENSE
  version: ''
  description: |
    ## Documentation source and versions
    This 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/).
  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=&labels=feedback%2Ccommunity&projects=&template=api-feedback.yaml&title=%5BFeedback%5D%3A+
security:
- apiKeyAuth: []
tags:
- name: autoscaling
  x-displayName: Autoscaling
  description: 'The autoscaling APIs enable you to create and manage autoscaling policies
    and retrieve information about autoscaling capacity. Autoscaling adjusts resources
    based on demand. A deployment can use autoscaling to scale resources as needed,
    ensuring sufficient capacity to meet workload requirements.

    '
  externalDocs:
    url: https://www.elastic.co/docs/deploy-manage/autoscaling
    description: Learn more about autoscaling.
- name: analytics
  x-displayName: Behavioral 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.

    '
- name: cat
  x-displayName: Compact and aligned text (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.
    All 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.
- name: cluster
  x-displayName: 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:
    url: https://www.elastic.co/docs/deploy-manage/distributed-architecture/discovery-cluster-formation/cluster-state-overview
    description: Learn more about the cluster state.
- name: health_report
  x-displayName: Cluster - Health
  description: 'The cluster - health API provides you a report with the health status
    of an Elasticsearch cluster.

    '
- name: connector
  x-displayName: 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.
    Connectors are Elasticsearch integrations for syncing content from third-party data sources, which can be deployed on Elastic Cloud or hosted on your own infrastructure.
    This 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.
    This API requires the `manage_connector` privilege or, for read-only endpoints, the `monitor_connector` privilege.
  externalDocs:
    url: https://www.elastic.co/docs/reference/search-connectors/api-tutorial
    description: Check out the connector API tutorial.
- name: ccr
  x-displayName: Cross-cluster replication
  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 about cross-cluster replication.
    url: https://www.elastic.co/docs/deploy-manage/tools/cross-cluster-replication
- name: data stream
  x-displayName: 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 about data streams.
    url: https://www.elastic.co/docs/manage-data/data-store/data-streams
- name: document
  x-displayName: Document
  description: 'The document APIs enable you to create and manage documents in an
    Elasticsearch index.

    '
  externalDocs:
    description: Learn more about reading and writing documents.
    url: https://www.elastic.co/docs/deploy-manage/distributed-architecture/reading-and-writing-documents
- name: enrich
  x-displayName: 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:
    url: https://www.elastic.co/docs/manage-data/ingest/transform-enrich/data-enrichment
    description: Learn more about data enrichment.
- name: eql
  x-displayName: EQL
  description: 'Event Query Language (EQL) is a query language for event-based time
    series data, such as logs, metrics, and traces.

    '
  externalDocs:
    url: https://www.elastic.co/docs/explore-analyze/query-filter/languages/eql
    description: Learn more about EQL search.
- name: esql
  x-displayName: ES|QL
  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:
    url: https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql
    description: Learn more about ES|QL.
- name: features
  x-displayName: Features
  description: 'The feature APIs enable you to introspect and manage features provided
    by Elasticsearch and Elasticsearch plugins.

    '
  externalDocs:
    url: https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore#feature-state
    description: Learn more about feature states.
- name: fleet
  x-displayName: Fleet
  description: 'The Fleet APIs support Fleet’s use of Elasticsearch as a data store
    for internal agent and action data.

    '
  externalDocs:
    url: https://www.elastic.co/docs/reference/fleet
    description: Learn more about Fleet.
- name: graph
  x-displayName: Graph explore
  description: 'The graph explore API enables you to extract and summarize information
    about the documents and terms in an Elasticsearch data stream or index.

    '
  externalDocs:
    url: https://www.elastic.co/docs/explore-analyze/visualize/graph
    description: Get started with Graph.
- name: indices
  x-displayName: Index
  description: 'Index APIs enable you to manage individual indices, index settings,
    aliases, mappings, and index templates.

    '
  externalDocs:
    url: https://www.elastic.co/docs/manage-data/data-store/index-basics
    description: Learn more about indices.
- name: ilm
  x-displayName: Index lifecycle management
  description: 'The index lifecycle management APIs enable you to set up policies
    to automatically manage the index lifecycle.

    '
  externalDocs:
    url: https://www.elastic.co/docs/manage-data/lifecycle/index-lifecycle-management
    description: Learn more about managing the index lifecycle.
- name: inference
  x-displayName: 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:
    url: https://www.elastic.co/docs/explore-analyze/elastic-inference/inference-api
    description: Learn about default inference endpoints, adaptive allocations, and
      chunking.
- name: info
  x-displayName: Info
  description: 'The info API provides basic build, version, and cluster information.

    '
- name: ingest
  x-displayName: Ingest
  description: Ingest APIs enable you to manage tasks and resources related to ingest
    pipelines and processors.
  externalDocs:
    url: https://www.elastic.co/docs/manage-data/ingest
    description: Learn more about ingesting data.
- name: license
  x-displayName: Licensing
  description: Licensing APIs enable you to manage your licenses.
  externalDocs:
    url: https://www.elastic.co/subscriptions
    description: For more information about the different types of licenses, refer
      to Elastic subscriptions.
- name: logstash
  x-displayName: Logstash
  description: 'Logstash APIs enable you to manage pipelines that are used by Logstash
    Central Management.

    '
  externalDocs:
    url: https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management
    description: Learn more about centralized pipeline management.
- name: ml
  x-displayName: Machine learning
  description: 'The machine learning APIs enable you to retrieve information related
    to the Elastic Stack machine learning features.

    '
  externalDocs:
    url: https://www.elastic.co/docs/explore-analyze/machine-learning
    description: Learn more about machine learning.
- name: ml anomaly
  x-displayName: Machine learning anomaly detection
  description: 'The machine learning anomaly detection APIs enable you to perform
    anomaly detection activities.

    '
  externalDocs:
    url: https://www.elastic.co/docs/explore-analyze/machine-learning/anomaly-detection/ml-ad-finding-anomalies
    description: Learn more about finding anomalies.
- name: ml data frame
  x-displayName: Machine learning data frame analytics
  description: 'The machine learning data frame analytics APIs enable you to perform
    data frame analytics activities.

    '
  externalDocs:
    url: https://www.elastic.co/docs/explore-analyze/machine-learning/data-frame-analytics/ml-dfa-overview
    description: Learn more about data frame analytics.
- name: ml trained model
  x-displayName: Machine learning trained model
  description: 'The machine learning trained models APIs enable you to perform model
    management operations.

    '
  externalDocs:
    url: https://www.elastic.co/docs/explore-analyze/machine-learning/nlp/ml-nlp-overview
    description: Learn more about natural language processing.
- name: migration
  x-displayName: Migration
  description: 'The migration APIs power Kibana''s Upgrade Assistant feature.

    '
  externalDocs:
    url: https://www.elastic.co/docs/deploy-manage/upgrade/prepare-to-upgrade/upgrade-assistant
    description: Learn more about Kibana's Upgrade Assistant.
- name: monitoring
  x-displayName: Monitoring
  externalDocs:
    url: https://www.elastic.co/docs/deploy-manage/monitor
    description: Learn more about monitoring.
- name: shutdown
  x-displayName: Node lifecycle
  description: 'The node lifecycle APIs enable you to prepare nodes for temporary
    or permanent shutdown, monitor the shutdown status, and enable a previously shut-down
    node to resume normal operations.

    '
- name: project
  x-displayName: Project
  description: 'The project APIs enable you to get project tags and manage your project
    routing expressions.

    '
- name: query_rules
  x-displayName: 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](https://www.elastic.co/docs/solutions/search/query-rules-ui) to manage query rules.
  externalDocs:
    url: https://www.elastic.co/docs/reference/elasticsearch/rest-apis/searching-with-query-rules
    description: Learn more about searching with query rules.
- name: rollup
  x-displayName: Rollup
  description: 'The rollup APIs enable you to create, manage, and retrieve information
    about rollup jobs.

    '
  externalDocs:
    url: https://www.elastic.co/docs/manage-data/lifecycle/rollup
    description: Learn more about rollup.
- name: script
  x-displayName: 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:
    url: https://www.elastic.co/docs/explore-analyze/scripting
    description: Learn more about scripting.
- name: search
  x-displayName: Search
  description: 'The search APIs enable you to search and aggregate data stored in
    Elasticsearch indices and data streams.

    '
  externalDocs:
    url: https://www.elastic.co/docs/explore-analyze
    description: Learn more about searching.
- name: search_application
  x-displayName: Search application
  description: 'The search application APIs enable you to manage tasks and resources
    related to Search Applications.

    '
  externalDocs:
    url: https://www.elastic.co/docs/solutions/search/search-applications
    description: Learn more about search applications.
- name: searchable_snapshots
  x-displayName: Searchable snapshots
  description: 'The searchable snapshots APIs enable you to perform searchable snapshots
    operations.

    '
  externalDocs:
    url: https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/searchable-snapshots
    description: Learn more about searchable snapshots.
- name: security
  x-displayName: Security
  description: 'The security APIs enable you to perform security activities, and add,
    update, retrieve, and remove application privileges, role mappings, and roles.
    You can also create and update API keys and create and invalidate bearer tokens.

    '
  externalDocs:
    url: https://www.elastic.co/docs/deploy-manage/security
    description: Learn more about security.
- name: snapshot
  x-displayName: Snapshot and restore
  description: 'Snapshot and restore APIs enable you to set up snapshot repositories,
    manage snapshot backups, and restore snapshots to a running cluster.

    '
  externalDocs:
    url: https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore
    description: Learn more about snapshot and restore operations.
- name: slm
  x-displayName: Snapshot lifecycle management
  description: 'Snapshot lifecycle management (SLM) APIs enable you to set up policies
    to automatically take snapshots and control how long they are retained.

    '
  externalDocs:
    url: https://www.elastic.co/docs/deploy-manage/tools/snapshot-and-restore/create-snapshots
    description: Learn more about creating a snapshot.
- name: sql
  x-displayName: SQL
  description: 'Elasticsearch''s SQL APIs enable you to run SQL queries on Elasticsearch
    indices and data streams.

    '
  externalDocs:
    url: https://www.elastic.co/docs/explore-analyze/query-filter/languages/sql
    description: Check out the overview and tutorials for the Elasticsearch SQL features.
- name: synonyms
  x-displayName: 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:
    url: https://www.elastic.co/docs/solutions/search/full-text/search-with-synonyms
    description: Learn more about synonyms.
- name: tasks
  x-displayName: Task management
  description: 'The task management APIs enable you to retrieve information about
    tasks or cancel tasks running in a cluster.

    '
  externalDocs:
    url: https://www.elastic.co/docs/troubleshoot/elasticsearch/task-queue-backlog
    description: Check out the troubleshooting the Task Management API.
- name: text_structure
  x-displayName: Text structure
  description: 'The text structure APIs enable you to find the structure of a text
    field in an Elasticsearch index.

    '
- name: transform
  x-displayName: Transform
  description: 'The transform APIs enable you to create and manage transforms.

    '
  externalDocs:
    url: https://www.elastic.co/docs/explore-analyze/transforms
    description: Learn more about transforms.
- name: xpack
  x-displayName: Usage
  description: 'The usage API provides usage information about the installed X-Pack
    features.

    '
- name: watcher
  x-displayName: Watcher
  description: 'You can use Watcher to watch for changes or anomalies in your data
    and perform the necessary actions in response.

    '
  externalDocs:
    url: https://www.elastic.co/docs/explore-analyze/alerts-cases/watcher
    description: Learn more about Watcher.
paths:
  "/_async_search/{id}":
    get:
      tags:
      - search
      summary: Get async search results
      description: |-
        Retrieve the results of a previously submitted asynchronous search request.
        If the Elasticsearch security features are enabled, access to the results of a specific async search is restricted to the user or API key that submitted it.
      operationId: async-search-get
      parameters:
      - in: path
        name: id
        description: A unique identifier for the async search.
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Id"
        style: simple
      - in: query
        name: keep_alive
        description: |-
          The length of time that the async search should be available in the cluster.
          When not specified, the `keep_alive` set with the corresponding submit async request will be used.
          Otherwise, it is possible to override the value and extend the validity of the request.
          When this period expires, the search, if still running, is cancelled.
          If the search is completed, its saved results are deleted.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Duration"
        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
      - in: query
        name: wait_for_completion_timeout
        description: |-
          Specifies to wait for the search to be completed up until the provided timeout.
          Final results will be returned if available before the timeout expires, otherwise the currently available results will be returned once the timeout expires.
          By default no timeout is set meaning that the currently available results will be returned without any additional wait.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Duration"
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/async_search._types.AsyncSearchDocumentResponseBase"
              examples:
                AsyncSearchGetResponseExample1:
                  description: A succesful response from `GET /_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=`.
                  value: "{\n  \"id\" : \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n
                    \ \"is_partial\" : false, \n  \"is_running\" : false, \n  \"start_time_in_millis\"
                    : 1583945890986,\n  \"expiration_time_in_millis\" : 1584377890986,
                    \n  \"completion_time_in_millis\" : 1583945903130, \n  \"response\"
                    : {\n    \"took\" : 12144,\n    \"timed_out\" : false,\n    \"num_reduce_phases\"
                    : 46, \n    \"_shards\" : {\n      \"total\" : 562,\n      \"successful\"
                    : 188, \n      \"skipped\" : 0,\n      \"failed\" : 0\n    },\n
                    \   \"hits\" : {\n      \"total\" : {\n        \"value\" : 456433,\n
                    \       \"relation\" : \"eq\"\n      },\n      \"max_score\" :
                    null,\n      \"hits\" : [ ]\n    },\n    \"aggregations\" : {
                    \n      \"sale_date\" :  {\n        \"buckets\" : []\n      }\n
                    \   }\n  }\n}"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=

          '
      - lang: Python
        source: |-
          resp = client.async_search.get(
              id="FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
          )
      - lang: JavaScript
        source: |-
          const response = await client.asyncSearch.get({
            id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
          });
      - lang: Ruby
        source: |-
          response = client.async_search.get(
            id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc="
          )
      - lang: PHP
        source: |-
          $resp = $client->asyncSearch()->get([
              "id" => "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
          ]);
      - 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
              .id("FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - search
      summary: Delete an async search
      description: |-
        If the asynchronous search is still running, it is cancelled.
        Otherwise, the saved search results are deleted.
        If the Elasticsearch security features are enabled, the deletion of a specific async search is restricted to: the authenticated user that submitted the original search request; users that have the `cancel_task` cluster privilege.
      operationId: async-search-delete
      parameters:
      - in: path
        name: id
        description: A unique identifier for the async 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
      x-codeSamples:
      - lang: Console
        source: 'DELETE /_async_search/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=

          '
      - lang: Python
        source: |-
          resp = client.async_search.delete(
              id="FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
          )
      - lang: JavaScript
        source: |-
          const response = await client.asyncSearch.delete({
            id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
          });
      - lang: Ruby
        source: |-
          response = client.async_search.delete(
            id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc="
          )
      - lang: PHP
        source: |-
          $resp = $client->asyncSearch()->delete([
              "id" => "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
          ]);
      - 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
              .id("FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_async_search/status/{id}":
    get:
      tags:
      - search
      summary: Get the async search status
      description: |
        Get the status of a previously submitted async search request given its identifier, without retrieving search results.
        If the Elasticsearch security features are enabled, the access to the status of a specific async search is restricted to:

        * The user or API key that submitted the original async search request.
        * Users that have the `monitor` cluster privilege or greater privileges.

        ## Required authorization

        * Cluster privileges: `monitor`
      operationId: async-search-status
      parameters:
      - in: path
        name: id
        description: A unique identifier for the async search.
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Id"
        style: simple
      - in: query
        name: keep_alive
        description: |-
          The length of time that the async search needs to be available.
          Ongoing async searches and any saved search results are deleted after this period.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Duration"
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/async_search.status.StatusResponseBase"
              examples:
                AsyncSearchStatusResponseExample1:
                  summary: An active async search
                  description: A succesful response from `GET /_async_search/status/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=`,
                    which retrieves the status of a previously submitted async search
                    without the results.
                  value: "{\n  \"id\" : \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n
                    \ \"is_running\" : true,\n  \"is_partial\" : true,\n  \"start_time_in_millis\"
                    : 1583945890986,\n  \"expiration_time_in_millis\" : 1584377890986,\n
                    \ \"_shards\" : {\n      \"total\" : 562,\n      \"successful\"
                    : 188, \n      \"skipped\" : 0,\n      \"failed\" : 0\n  }\n}"
                AsyncSearchStatusResponseExample2:
                  summary: A completed async search
                  description: 'A succesful response from `GET /_async_search/status/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=`
                    for an async search that has completed. The status response has
                    an additional `completion_status` field that shows the status
                    code of the completed async search.

                    '
                  value: "{\n  \"id\" : \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n
                    \ \"is_running\" : false,\n  \"is_partial\" : false,\n  \"start_time_in_millis\"
                    : 1583945890986,\n  \"expiration_time_in_millis\" : 1584377890986,\n
                    \ \"_shards\" : {\n      \"total\" : 562,\n      \"successful\"
                    : 562,\n      \"skipped\" : 0,\n      \"failed\" : 0\n  },\n\"completion_status\"
                    : 200 \n}"
                AsyncSearchStatusResponseExample3:
                  summary: A failed async search
                  description: 'A response from `GET /_async_search/status/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=`
                    for an async search that has completed with an error. The status
                    response has an additional `completion_status` field that shows
                    the status code of the completed async search.

                    '
                  value: "{\n  \"id\" : \"FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=\",\n
                    \ \"is_running\" : false,\n  \"is_partial\" : true,\n  \"start_time_in_millis\"
                    : 1583945890986,\n  \"expiration_time_in_millis\" : 1584377890986,\n
                    \ \"_shards\" : {\n      \"total\" : 562,\n      \"successful\"
                    : 450,\n      \"skipped\" : 0,\n      \"failed\" : 112\n  },\n\"completion_status\"
                    : 503 \n}"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_async_search/status/FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=

          '
      - lang: Python
        source: |-
          resp = client.async_search.status(
              id="FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
          )
      - lang: JavaScript
        source: |-
          const response = await client.asyncSearch.status({
            id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
          });
      - lang: Ruby
        source: |-
          response = client.async_search.status(
            id: "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc="
          )
      - lang: PHP
        source: |-
          $resp = $client->asyncSearch()->status([
              "id" => "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
          ]);
      - 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
              .id("FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_async_search":
    post:
      tags:
      - search
      summary: 'Run an async search

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_async_search</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_async_search</span>\n
        \                     </div>\n                    \n\nWhen 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-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"
      - "$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"
      requestBody:
        "$ref": "#/components/requestBodies/async_search.submit"
      responses:
        '200':
          "$ref": "#/components/responses/async_search.submit-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST /sales*/_async_search?size=0
          {
            "sort": [
              { "date": { "order": "asc" } }
            ],
            "aggs": {
              "sale_date": {
                "date_histogram": {
                  "field": "date",
                  "calendar_interval": "1d"
                }
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.async_search.submit(
              index="sales*",
              size="0",
              sort=[
                  {
                      "date": {
                          "order": "asc"
                      }
                  }
              ],
              aggs={
                  "sale_date": {
                      "date_histogram": {
                          "field": "date",
                          "calendar_interval": "1d"
                      }
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.asyncSearch.submit({
            index: "sales*",
            size: 0,
            sort: [
              {
                date: {
                  order: "asc",
                },
              },
            ],
            aggs: {
              sale_date: {
                date_histogram: {
                  field: "date",
                  calendar_interval: "1d",
                },
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.async_search.submit(
            index: "sales*",
            size: "0",
            body: {
              "sort": [
                {
                  "date": {
                    "order": "asc"
                  }
                }
              ],
              "aggs": {
                "sale_date": {
                  "date_histogram": {
                    "field": "date",
                    "calendar_interval": "1d"
                  }
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->asyncSearch()->submit([
              "index" => "sales*",
              "size" => "0",
              "body" => [
                  "sort" => array(
                      [
                          "date" => [
                              "order" => "asc",
                          ],
                      ],
                  ),
                  "aggs" => [
                      "sale_date" => [
                          "date_histogram" => [
                              "field" => "date",
                              "calendar_interval" => "1d",
                          ],
                      ],
                  ],
              ],
          ]);
      - 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
              .aggregations("sale_date", a -> a
                  .dateHistogram(d -> d
                      .calendarInterval(CalendarInterval.Day)
                      .field("date")
                  )
              )
              .index("sales*")
              .size(0)
              .sort(so -> so
                  .field(f -> f
                      .field("date")
                      .order(SortOrder.Asc)
                  )
              )
          ,Void.class);
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_bulk":
    put:
      tags:
      - document
      summary: 'Bulk index or delete documents

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_bulk</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/_bulk</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_bulk</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/{index}/_bulk</span>\n
        \                     </div>\n                    \n\nPerform 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.18/docs-bulk.html
      operationId: bulk
      parameters:
      - "$ref": "#/components/parameters/bulk-index"
      - "$ref": "#/components/parameters/bulk-include_source_on_error"
      - "$ref": "#/components/parameters/bulk-list_executed_pipelines"
      - "$ref": "#/components/parameters/bulk-pipeline"
      - "$ref": "#/components/parameters/bulk-refresh"
      - "$ref": "#/components/parameters/bulk-routing"
      - "$ref": "#/components/parameters/bulk-_source"
      - "$ref": "#/components/parameters/bulk-_source_excludes"
      - "$ref": "#/components/parameters/bulk-_source_includes"
      - "$ref": "#/components/parameters/bulk-timeout"
      - "$ref": "#/components/parameters/bulk-wait_for_active_shards"
      - "$ref": "#/components/parameters/bulk-require_alias"
      - "$ref": "#/components/parameters/bulk-require_data_stream"
      requestBody:
        "$ref": "#/components/requestBodies/bulk"
      responses:
        '200':
          "$ref": "#/components/responses/bulk-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _bulk
          { "index" : { "_index" : "test", "_id" : "1" } }
          { "field1" : "value1" }
          { "delete" : { "_index" : "test", "_id" : "2" } }
          { "create" : { "_index" : "test", "_id" : "3" } }
          { "field1" : "value3" }
          { "update" : {"_id" : "1", "_index" : "test"} }
          { "doc" : {"field2" : "value2"} }
      - lang: Python
        source: |-
          resp = client.bulk(
              operations=[
                  {
                      "index": {
                          "_index": "test",
                          "_id": "1"
                      }
                  },
                  {
                      "field1": "value1"
                  },
                  {
                      "delete": {
                          "_index": "test",
                          "_id": "2"
                      }
                  },
                  {
                      "create": {
                          "_index": "test",
                          "_id": "3"
                      }
                  },
                  {
                      "field1": "value3"
                  },
                  {
                      "update": {
                          "_id": "1",
                          "_index": "test"
                      }
                  },
                  {
                      "doc": {
                          "field2": "value2"
                      }
                  }
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.bulk({
            operations: [
              {
                index: {
                  _index: "test",
                  _id: "1",
                },
              },
              {
                field1: "value1",
              },
              {
                delete: {
                  _index: "test",
                  _id: "2",
                },
              },
              {
                create: {
                  _index: "test",
                  _id: "3",
                },
              },
              {
                field1: "value3",
              },
              {
                update: {
                  _id: "1",
                  _index: "test",
                },
              },
              {
                doc: {
                  field2: "value2",
                },
              },
            ],
          });
      - lang: Ruby
        source: |-
          response = client.bulk(
            body: [
              {
                "index": {
                  "_index": "test",
                  "_id": "1"
                }
              },
              {
                "field1": "value1"
              },
              {
                "delete": {
                  "_index": "test",
                  "_id": "2"
                }
              },
              {
                "create": {
                  "_index": "test",
                  "_id": "3"
                }
              },
              {
                "field1": "value3"
              },
              {
                "update": {
                  "_id": "1",
                  "_index": "test"
                }
              },
              {
                "doc": {
                  "field2": "value2"
                }
              }
            ]
          )
      - lang: PHP
        source: |-
          $resp = $client->bulk([
              "body" => array(
                  [
                      "index" => [
                          "_index" => "test",
                          "_id" => "1",
                      ],
                  ],
                  [
                      "field1" => "value1",
                  ],
                  [
                      "delete" => [
                          "_index" => "test",
                          "_id" => "2",
                      ],
                  ],
                  [
                      "create" => [
                          "_index" => "test",
                          "_id" => "3",
                      ],
                  ],
                  [
                      "field1" => "value3",
                  ],
                  [
                      "update" => [
                          "_id" => "1",
                          "_index" => "test",
                      ],
                  ],
                  [
                      "doc" => [
                          "field2" => "value2",
                      ],
                  ],
              ),
          ]);
      - 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
        name: product_name
  "/_cat/aliases/{name}":
    get:
      tags:
      - cat
      summary: 'Get aliases

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/aliases</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/aliases/{name}</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n## Required
        authorization\n\n* Index privileges: `view_index_metadata`\n"
      operationId: cat-aliases
      parameters:
      - "$ref": "#/components/parameters/cat.aliases-name"
      - "$ref": "#/components/parameters/cat.aliases-h"
      - "$ref": "#/components/parameters/cat.aliases-s"
      - "$ref": "#/components/parameters/cat.aliases-expand_wildcards"
      - "$ref": "#/components/parameters/cat.aliases-master_timeout"
      responses:
        '200':
          "$ref": "#/components/responses/cat.aliases-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _cat/aliases?format=json&v=true

          '
      - lang: Python
        source: |-
          resp = client.cat.aliases(
              format="json",
              v=True,
          )
      - lang: JavaScript
        source: |-
          const response = await client.cat.aliases({
            format: "json",
            v: "true",
          });
      - lang: Ruby
        source: |-
          response = client.cat.aliases(
            format: "json",
            v: "true"
          )
      - lang: PHP
        source: |-
          $resp = $client->cat()->aliases([
              "format" => "json",
              "v" => "true",
          ]);
      - 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();

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_cat/component_templates/{name}":
    get:
      tags:
      - cat
      summary: 'Get component templates

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/component_templates</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/component_templates/{name}</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n## Required
        authorization\n\n* Cluster privileges: `monitor`\n"
      operationId: cat-component-templates
      parameters:
      - "$ref": "#/components/parameters/cat.component_templates-name"
      - "$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"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _cat/component_templates/my-template-*?v=true&s=name&format=json

          '
      - lang: Python
        source: |-
          resp = client.cat.component_templates(
              name="my-template-*",
              v=True,
              s="name",
              format="json",
          )
      - lang: JavaScript
        source: |-
          const response = await client.cat.componentTemplates({
            name: "my-template-*",
            v: "true",
            s: "name",
            format: "json",
          });
      - lang: Ruby
        source: |-
          response = client.cat.component_templates(
            name: "my-template-*",
            v: "true",
            s: "name",
            format: "json"
          )
      - lang: PHP
        source: |-
          $resp = $client->cat()->componentTemplates([
              "name" => "my-template-*",
              "v" => "true",
              "s" => "name",
              "format" => "json",
          ]);
      - 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();

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_cat/count/{index}":
    post:
      tags:
      - cat
      summary: 'Get a document count

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/count</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_cat/count</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/count/{index}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_cat/count/{index}</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n## Required authorization\n\n* Index privileges: `read`\n"
      operationId: cat-count
      parameters:
      - "$ref": "#/components/parameters/cat.count-index"
      - "$ref": "#/components/parameters/cat.count-h"
      - "$ref": "#/components/parameters/cat.count-s"
      requestBody:
        "$ref": "#/components/requestBodies/cat.count"
      responses:
        '200':
          "$ref": "#/components/responses/cat.count-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_cat/count/my-index-000001?v=true&format=json

          '
      - lang: Python
        source: |-
          resp = client.cat.count(
              index="my-index-000001",
              v=True,
              format="json",
          )
      - lang: JavaScript
        source: |-
          const response = await client.cat.count({
            index: "my-index-000001",
            v: "true",
            format: "json",
          });
      - lang: Ruby
        source: |-
          response = client.cat.count(
            index: "my-index-000001",
            v: "true",
            format: "json"
          )
      - lang: PHP
        source: |-
          $resp = $client->cat()->count([
              "index" => "my-index-000001",
              "v" => "true",
              "format" => "json",
          ]);
      - 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();

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_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
      x-state: Generally available
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_cat/indices/{index}":
    get:
      tags:
      - cat
      summary: 'Get index information

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/indices</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/indices/{index}</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n## Required
        authorization\n\n* Index privileges: `monitor`\n* Cluster privileges: `monitor`\n"
      operationId: cat-indices
      parameters:
      - "$ref": "#/components/parameters/cat.indices-index"
      - "$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-master_timeout"
      - "$ref": "#/components/parameters/cat.indices-h"
      - "$ref": "#/components/parameters/cat.indices-s"
      responses:
        '200':
          "$ref": "#/components/responses/cat.indices-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_cat/indices/my-index-*?v=true&s=index&format=json

          '
      - lang: Python
        source: |-
          resp = client.cat.indices(
              index="my-index-*",
              v=True,
              s="index",
              format="json",
          )
      - lang: JavaScript
        source: |-
          const response = await client.cat.indices({
            index: "my-index-*",
            v: "true",
            s: "index",
            format: "json",
          });
      - lang: Ruby
        source: |-
          response = client.cat.indices(
            index: "my-index-*",
            v: "true",
            s: "index",
            format: "json"
          )
      - lang: PHP
        source: |-
          $resp = $client->cat()->indices([
              "index" => "my-index-*",
              "v" => "true",
              "s" => "index",
              "format" => "json",
          ]);
      - 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();

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_cat/ml/data_frame/analytics/{id}":
    get:
      tags:
      - cat
      summary: 'Get data frame analytics jobs

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/ml/data_frame/analytics</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/ml/data_frame/analytics/{id}</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n## Required authorization\n\n*
        Cluster privileges: `monitor_ml`\n"
      operationId: cat-ml-data-frame-analytics
      parameters:
      - "$ref": "#/components/parameters/cat.ml_data_frame_analytics-id"
      - "$ref": "#/components/parameters/cat.ml_data_frame_analytics-allow_no_match"
      - "$ref": "#/components/parameters/cat.ml_data_frame_analytics-h"
      - "$ref": "#/components/parameters/cat.ml_data_frame_analytics-s"
      responses:
        '200':
          "$ref": "#/components/responses/cat.ml_data_frame_analytics-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _cat/ml/data_frame/analytics?v=true&format=json

          '
      - lang: Python
        source: |-
          resp = client.cat.ml_data_frame_analytics(
              v=True,
              format="json",
          )
      - lang: JavaScript
        source: |-
          const response = await client.cat.mlDataFrameAnalytics({
            v: "true",
            format: "json",
          });
      - lang: Ruby
        source: |-
          response = client.cat.ml_data_frame_analytics(
            v: "true",
            format: "json"
          )
      - lang: PHP
        source: |-
          $resp = $client->cat()->mlDataFrameAnalytics([
              "v" => "true",
              "format" => "json",
          ]);
      - 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();

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_cat/ml/datafeeds/{datafeed_id}":
    get:
      tags:
      - cat
      summary: 'Get datafeeds

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/ml/datafeeds</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/ml/datafeeds/{datafeed_id}</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n## Required authorization\n\n*
        Cluster privileges: `monitor_ml`\n"
      operationId: cat-ml-datafeeds
      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"
      responses:
        '200':
          "$ref": "#/components/responses/cat.ml_datafeeds-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _cat/ml/datafeeds?v=true&format=json

          '
      - lang: Python
        source: |-
          resp = client.cat.ml_datafeeds(
              v=True,
              format="json",
          )
      - lang: JavaScript
        source: |-
          const response = await client.cat.mlDatafeeds({
            v: "true",
            format: "json",
          });
      - lang: Ruby
        source: |-
          response = client.cat.ml_datafeeds(
            v: "true",
            format: "json"
          )
      - lang: PHP
        source: |-
          $resp = $client->cat()->mlDatafeeds([
              "v" => "true",
              "format" => "json",
          ]);
      - 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();

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_cat/ml/anomaly_detectors/{job_id}":
    get:
      tags:
      - cat
      summary: 'Get anomaly detection jobs

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/ml/anomaly_detectors</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/ml/anomaly_detectors/{job_id}</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n## Required authorization\n\n* Cluster privileges:
        `monitor_ml`\n"
      operationId: cat-ml-jobs
      parameters:
      - "$ref": "#/components/parameters/cat.ml_jobs-job_id"
      - "$ref": "#/components/parameters/cat.ml_jobs-allow_no_match"
      - "$ref": "#/components/parameters/cat.ml_jobs-h"
      - "$ref": "#/components/parameters/cat.ml_jobs-s"
      responses:
        '200':
          "$ref": "#/components/responses/cat.ml_jobs-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _cat/ml/anomaly_detectors?h=id,s,dpr,mb&v=true&format=json

          '
      - lang: Python
        source: |-
          resp = client.cat.ml_jobs(
              h="id,s,dpr,mb",
              v=True,
              format="json",
          )
      - lang: JavaScript
        source: |-
          const response = await client.cat.mlJobs({
            h: "id,s,dpr,mb",
            v: "true",
            format: "json",
          });
      - lang: Ruby
        source: |-
          response = client.cat.ml_jobs(
            h: "id,s,dpr,mb",
            v: "true",
            format: "json"
          )
      - lang: PHP
        source: |-
          $resp = $client->cat()->mlJobs([
              "h" => "id,s,dpr,mb",
              "v" => "true",
              "format" => "json",
          ]);
      - 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();

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_cat/ml/trained_models/{model_id}":
    get:
      tags:
      - cat
      summary: 'Get trained models

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/ml/trained_models</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/ml/trained_models/{model_id}</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n## Required authorization\n\n*
        Cluster privileges: `monitor_ml`\n"
      operationId: cat-ml-trained-models
      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-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"
      responses:
        '200':
          "$ref": "#/components/responses/cat.ml_trained_models-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _cat/ml/trained_models?v=true&format=json

          '
      - lang: Python
        source: |-
          resp = client.cat.ml_trained_models(
              v=True,
              format="json",
          )
      - lang: JavaScript
        source: |-
          const response = await client.cat.mlTrainedModels({
            v: "true",
            format: "json",
          });
      - lang: Ruby
        source: |-
          response = client.cat.ml_trained_models(
            v: "true",
            format: "json"
          )
      - lang: PHP
        source: |-
          $resp = $client->cat()->mlTrainedModels([
              "v" => "true",
              "format" => "json",
          ]);
      - 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();

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_cat/transforms/{transform_id}":
    get:
      tags:
      - cat
      summary: 'Get transform information

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/transforms</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_cat/transforms/{transform_id}</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n## Required authorization\n\n* Cluster privileges: `monitor_transform`\n"
      operationId: cat-transforms
      parameters:
      - "$ref": "#/components/parameters/cat.transforms-transform_id"
      - "$ref": "#/components/parameters/cat.transforms-allow_no_match"
      - "$ref": "#/components/parameters/cat.transforms-from"
      - "$ref": "#/components/parameters/cat.transforms-h"
      - "$ref": "#/components/parameters/cat.transforms-s"
      - "$ref": "#/components/parameters/cat.transforms-size"
      responses:
        '200':
          "$ref": "#/components/responses/cat.transforms-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_cat/transforms?v=true&format=json

          '
      - lang: Python
        source: |-
          resp = client.cat.transforms(
              v=True,
              format="json",
          )
      - lang: JavaScript
        source: |-
          const response = await client.cat.transforms({
            v: "true",
            format: "json",
          });
      - lang: Ruby
        source: |-
          response = client.cat.transforms(
            v: "true",
            format: "json"
          )
      - lang: PHP
        source: |-
          $resp = $client->cat()->transforms([
              "v" => "true",
              "format" => "json",
          ]);
      - 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();

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_search/scroll/{scroll_id}":
    post:
      tags:
      - search
      summary: 'Run a scrolling search

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_search/scroll</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_search/scroll</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_search/scroll/{scroll_id}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_search/scroll/{scroll_id}</span>\n
        \                     </div>\n                    \n\nIMPORTANT: 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.\n\n## Required
        authorization\n\n* Index privileges: `read`\n"
      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.18/scroll-api.html
      operationId: scroll
      parameters:
      - "$ref": "#/components/parameters/scroll-scroll_id"
      - "$ref": "#/components/parameters/scroll-scroll"
      - "$ref": "#/components/parameters/scroll-scroll_id_"
      - "$ref": "#/components/parameters/scroll-rest_total_hits_as_int"
      requestBody:
        "$ref": "#/components/requestBodies/scroll"
      responses:
        '200':
          "$ref": "#/components/responses/scroll-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          GET /_search/scroll
          {
            "scroll_id" : "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
          }
      - lang: Python
        source: |-
          resp = client.scroll(
              scroll_id="DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==",
          )
      - lang: JavaScript
        source: |-
          const response = await client.scroll({
            scroll_id: "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==",
          });
      - lang: Ruby
        source: |-
          response = client.scroll(
            body: {
              "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->scroll([
              "body" => [
                  "scroll_id" => "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==",
              ],
          ]);
      - 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
              .scrollId("DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - search
      summary: 'Clear a scrolling search

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb delete\">DELETE</span>\n                      <span
        class=\"operation-path\">/_search/scroll</span>\n                      </div>\n
        \                   <div>\n                      <span class=\"operation-verb
        delete\">DELETE</span>\n                      <span class=\"operation-path\">/_search/scroll/{scroll_id}</span>\n
        \                     </div>\n                    \n\nClear 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.18/clear-scroll-api.html
      operationId: clear-scroll
      parameters:
      - "$ref": "#/components/parameters/clear_scroll-scroll_id"
      requestBody:
        "$ref": "#/components/requestBodies/clear_scroll"
      responses:
        '200':
          "$ref": "#/components/responses/clear_scroll-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          DELETE /_search/scroll
          {
            "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
          }
      - lang: Python
        source: |-
          resp = client.clear_scroll(
              scroll_id="DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==",
          )
      - lang: JavaScript
        source: |-
          const response = await client.clearScroll({
            scroll_id: "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==",
          });
      - lang: Ruby
        source: |-
          response = client.clear_scroll(
            body: {
              "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->clearScroll([
              "body" => [
                  "scroll_id" => "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==",
              ],
          ]);
      - 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
              .scrollId("DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ==")
          );
      x-metaTags:
      - 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.
        The `keep_alive` parameter tells Elasticsearch how long it should persist.
        A point in time is automatically closed when the `keep_alive` period has elapsed.
        However, 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:
                  description: The ID of the point-in-time.
                  allOf:
                  - "$ref": "#/components/schemas/_types.Id"
              required:
              - id
            examples:
              ClosePointInTimeRequestExample1:
                description: Run `DELETE /_pit` to close a point-in-time.
                value: |-
                  {
                    "id": "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA=="
                  }
        required: true
      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
              examples:
                ClosePointInTimeResponseExample1:
                  description: A successful response from `DELETE /_pit`.
                  value: "{\n  \"succeeded\": true, \n  \"num_freed\": 3     \n}"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          DELETE /_pit
          {
            "id": "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA=="
          }
      - lang: Python
        source: |-
          resp = client.close_point_in_time(
              id="46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==",
          )
      - lang: JavaScript
        source: |-
          const response = await client.closePointInTime({
            id: "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==",
          });
      - lang: Ruby
        source: |-
          response = client.close_point_in_time(
            body: {
              "id": "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA=="
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->closePointInTime([
              "body" => [
                  "id" => "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==",
              ],
          ]);
      - 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
              .id("46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA==")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_component_template/{name}":
    get:
      tags:
      - indices
      summary: 'Get component templates

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_component_template</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_component_template/{name}</span>\n
        \                     </div>\n                    \n\nGet information about
        component templates.\n\n## Required authorization\n\n* Cluster privileges:
        `manage_index_templates`\n"
      operationId: cluster-get-component-template
      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-settings_filter"
      - "$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"
      responses:
        '200':
          "$ref": "#/components/responses/cluster.get_component_template-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_component_template/template_1

          '
      - lang: Python
        source: |-
          resp = client.cluster.get_component_template(
              name="template_1",
          )
      - lang: JavaScript
        source: |-
          const response = await client.cluster.getComponentTemplate({
            name: "template_1",
          });
      - lang: Ruby
        source: |-
          response = client.cluster.get_component_template(
            name: "template_1"
          )
      - lang: PHP
        source: |-
          $resp = $client->cluster()->getComponentTemplate([
              "name" => "template_1",
          ]);
      - 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
              .name("template_1")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    post:
      tags:
      - indices
      summary: 'Create or update a component template

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/_component_template/{name}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_component_template/{name}</span>\n
        \                     </div>\n                    \n\nComponent 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.\n\n##
        Required authorization\n\n* Cluster privileges: `manage_index_templates`\n"
      operationId: cluster-put-component-template
      parameters:
      - "$ref": "#/components/parameters/cluster.put_component_template-name"
      - "$ref": "#/components/parameters/cluster.put_component_template-create"
      - "$ref": "#/components/parameters/cluster.put_component_template-cause"
      - "$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: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _component_template/template_1
          {
            "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"
                  }
                }
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.cluster.put_component_template(
              name="template_1",
              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"
                          }
                      }
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.cluster.putComponentTemplate({
            name: "template_1",
            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",
                  },
                },
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.cluster.put_component_template(
            name: "template_1",
            body: {
              "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"
                    }
                  }
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->cluster()->putComponentTemplate([
              "name" => "template_1",
              "body" => [
                  "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",
                              ],
                          ],
                      ],
                  ],
              ],
          ]);
      - 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
              .name("template_1")
              .template(t -> t
                  .mappings(m -> m
                      .properties(Map.of("created_at", Property.of(pr -> pr
                              .date(d -> d
                                  .format("EEE MMM dd HH:mm:ss Z yyyy")
                              )
                          ),"host_name", Property.of(pro -> pro
                              .keyword(k -> k)
                          )))
                      .source(s -> s
                          .enabled(false)
                      )
                  )
                  .settings(s -> s
                      .numberOfShards("1")
                  )
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - indices
      summary: Delete component templates
      description: |
        Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases.

        ## Required authorization

        * Cluster privileges: `manage_index_templates`
      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
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Names"
        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:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _component_template/template_1

          '
      - lang: Python
        source: |-
          resp = client.cluster.delete_component_template(
              name="template_1",
          )
      - lang: JavaScript
        source: |-
          const response = await client.cluster.deleteComponentTemplate({
            name: "template_1",
          });
      - lang: Ruby
        source: |-
          response = client.cluster.delete_component_template(
            name: "template_1"
          )
      - lang: PHP
        source: |-
          $resp = $client->cluster()->deleteComponentTemplate([
              "name" => "template_1",
          ]);
      - 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
              .name("template_1")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    head:
      tags:
      - indices
      summary: Check component templates
      description: Returns information about whether a particular component template
        exists.
      operationId: cluster-exists-component-template
      parameters:
      - in: path
        name: name
        description: |-
          Comma-separated list of component template names used to limit the request.
          Wildcard (*) expressions are supported.
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Names"
        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: 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
      responses:
        '200':
          description: ''
          content:
            application/json: {}
      x-state: Generally available
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_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.

          Supported values include: `_all`, `http`, `ingest`, `thread_pool`, `script`

        required: true
        deprecated: false
        schema:
          "$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
      x-codeSamples:
      - lang: Console
        source: 'GET /_info/_all

          '
      - lang: Python
        source: |-
          resp = client.cluster.info(
              target="_all",
          )
      - lang: JavaScript
        source: |-
          const response = await client.cluster.info({
            target: "_all",
          });
      - lang: Ruby
        source: |-
          response = client.cluster.info(
            target: "_all"
          )
      - lang: PHP
        source: |-
          $resp = $client->cluster()->info([
              "target" => "_all",
          ]);
      - lang: curl
        source: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_info/_all"'
      - lang: Java
        source: |
          client.cluster().info(i -> i
              .target("_all")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_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: path
        name: connector_id
        description: The unique identifier of the connector to be checked in
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Id"
        style: simple
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                required:
                - result
              examples:
                ConnectorCheckInResponseExample1:
                  value: |-
                    {
                        "result": "updated"
                    }
      x-state: Technical preview
      x-codeSamples:
      - lang: Console
        source: 'PUT _connector/my-connector/_check_in

          '
      - lang: Python
        source: |-
          resp = client.connector.check_in(
              connector_id="my-connector",
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.checkIn({
            connector_id: "my-connector",
          });
      - lang: Ruby
        source: |-
          response = client.connector.check_in(
            connector_id: "my-connector"
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->checkIn([
              "connector_id" => "my-connector",
          ]);
      - 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
              .connectorId("my-connector")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/{connector_id}":
    get:
      tags:
      - connector
      summary: Get a connector
      description: Get the details about a connector.
      operationId: connector-get
      parameters:
      - in: path
        name: connector_id
        description: The unique identifier of the connector
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Id"
        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.
        deprecated: false
        schema:
          type: boolean
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/connector._types.Connector"
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: 'GET _connector/my-connector-id

          '
      - lang: Python
        source: |-
          resp = client.connector.get(
              connector_id="my-connector-id",
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.get({
            connector_id: "my-connector-id",
          });
      - lang: Ruby
        source: |-
          response = client.connector.get(
            connector_id: "my-connector-id"
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->get([
              "connector_id" => "my-connector-id",
          ]);
      - 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
              .connectorId("my-connector-id")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    put:
      tags:
      - connector
      summary: 'Create or update a connector

        '
      description: |-
        **All methods and paths for this operation:**

        <div>
                              <span class="operation-verb put">PUT</span>
                              <span class="operation-path">/_connector</span>
                              </div>
                            <div>
                              <span class="operation-verb put">PUT</span>
                              <span class="operation-path">/_connector/{connector_id}</span>
                              </div>
      operationId: connector-put
      parameters:
      - "$ref": "#/components/parameters/connector.put-connector_id"
      requestBody:
        "$ref": "#/components/requestBodies/connector.put"
      responses:
        '200':
          "$ref": "#/components/responses/connector.put-200"
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _connector/my-connector
          {
            "index_name": "search-google-drive",
            "name": "My Connector",
            "service_type": "google_drive"
          }
      - lang: Python
        source: |-
          resp = client.connector.put(
              connector_id="my-connector",
              index_name="search-google-drive",
              name="My Connector",
              service_type="google_drive",
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.put({
            connector_id: "my-connector",
            index_name: "search-google-drive",
            name: "My Connector",
            service_type: "google_drive",
          });
      - lang: Ruby
        source: |-
          response = client.connector.put(
            connector_id: "my-connector",
            body: {
              "index_name": "search-google-drive",
              "name": "My Connector",
              "service_type": "google_drive"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->put([
              "connector_id" => "my-connector",
              "body" => [
                  "index_name" => "search-google-drive",
                  "name" => "My Connector",
                  "service_type" => "google_drive",
              ],
          ]);
      - 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
              .connectorId("my-connector")
              .indexName("search-google-drive")
              .name("My Connector")
              .serviceType("google_drive")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - connector
      summary: Delete a connector
      description: |-
        Removes a connector and associated sync jobs.
        This is a destructive action that is not recoverable.
        NOTE: This action doesn’t delete any API keys, ingest pipelines, or data indices associated with the connector.
        These need to be removed manually.
      operationId: connector-delete
      parameters:
      - in: path
        name: connector_id
        description: The unique identifier of the connector to be deleted
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Id"
        style: simple
      - in: query
        name: delete_sync_jobs
        description: A flag indicating if associated sync jobs should be also removed.
        deprecated: false
        schema:
          type: boolean
        style: form
      - in: query
        name: hard
        description: A flag indicating if the connector should be hard deleted.
        deprecated: false
        schema:
          type: boolean
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
              examples:
                ConnectorDeleteResponseExample1:
                  value: |-
                    {
                        "acknowledged": true
                    }
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: 'DELETE _connector/my-connector-id&delete_sync_jobs=true

          '
      - lang: Python
        source: |-
          resp = client.connector.delete(
              connector_id="my-connector-id&delete_sync_jobs=true",
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.delete({
            connector_id: "my-connector-id&delete_sync_jobs=true",
          });
      - lang: Ruby
        source: |-
          response = client.connector.delete(
            connector_id: "my-connector-id&delete_sync_jobs=true"
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->delete([
              "connector_id" => "my-connector-id&delete_sync_jobs=true",
          ]);
      - 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
              .connectorId("my-connector-id&delete_sync_jobs=true")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector":
    get:
      tags:
      - connector
      summary: Get all connectors
      description: Get information about all connectors.
      operationId: connector-list
      parameters:
      - 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
      - in: query
        name: index_name
        description: A comma-separated list of connector index names to fetch connector
          documents for
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Indices"
        style: form
      - in: query
        name: connector_name
        description: A comma-separated list of connector names to fetch connector
          documents for
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Names"
        style: form
      - in: query
        name: service_type
        description: A comma-separated list of connector service types to fetch connector
          documents for
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Names"
        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.
        deprecated: false
        schema:
          type: boolean
        style: form
      - in: query
        name: query
        description: A wildcard query string that filters connectors with matching
          name, description or index name
        deprecated: false
        schema:
          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
      x-codeSamples:
      - lang: Console
        source: 'GET _connector

          '
      - 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);

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    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.
        Elastic managed connectors (Native connectors) are a managed service on Elastic Cloud.
        Self-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:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                  id:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Id"
                required:
                - result
                - id
      x-state: Beta
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/_sync_job/{connector_sync_job_id}/_cancel":
    put:
      tags:
      - connector
      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.
        The connector service is then responsible for setting the status of connector sync jobs to cancelled.
      operationId: connector-sync-job-cancel
      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
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                required:
                - result
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: 'PUT _connector/_sync_job/my-connector-sync-job-id/_cancel

          '
      - lang: Python
        source: |-
          resp = client.connector.sync_job_cancel(
              connector_sync_job_id="my-connector-sync-job-id",
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.syncJobCancel({
            connector_sync_job_id: "my-connector-sync-job-id",
          });
      - lang: Ruby
        source: |-
          response = client.connector.sync_job_cancel(
            connector_sync_job_id: "my-connector-sync-job-id"
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->syncJobCancel([
              "connector_sync_job_id" => "my-connector-sync-job-id",
          ]);
      - 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
              .connectorSyncJobId("my-connector-sync-job-id")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/_sync_job/{connector_sync_job_id}":
    get:
      tags:
      - 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
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/connector._types.ConnectorSyncJob"
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: 'GET _connector/_sync_job/my-connector-sync-job

          '
      - lang: Python
        source: |-
          resp = client.connector.sync_job_get(
              connector_sync_job_id="my-connector-sync-job",
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.syncJobGet({
            connector_sync_job_id: "my-connector-sync-job",
          });
      - lang: Ruby
        source: |-
          response = client.connector.sync_job_get(
            connector_sync_job_id: "my-connector-sync-job"
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->syncJobGet([
              "connector_sync_job_id" => "my-connector-sync-job",
          ]);
      - 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
              .connectorSyncJobId("my-connector-sync-job")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - connector
      summary: Delete a connector sync job
      description: |-
        Remove a connector sync job and its associated data.
        This is a destructive action that is not recoverable.
      operationId: connector-sync-job-delete
      parameters:
      - in: path
        name: connector_sync_job_id
        description: The unique identifier of the connector sync job to be deleted
        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:
                SyncJobDeleteResponseExample1:
                  value: |-
                    {
                      "acknowledged": true
                    }
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: 'DELETE _connector/_sync_job/my-connector-sync-job-id

          '
      - lang: Python
        source: |-
          resp = client.connector.sync_job_delete(
              connector_sync_job_id="my-connector-sync-job-id",
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.syncJobDelete({
            connector_sync_job_id: "my-connector-sync-job-id",
          });
      - lang: Ruby
        source: |-
          response = client.connector.sync_job_delete(
            connector_sync_job_id: "my-connector-sync-job-id"
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->syncJobDelete([
              "connector_sync_job_id" => "my-connector-sync-job-id",
          ]);
      - 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
              .connectorSyncJobId("my-connector-sync-job-id")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/_sync_job":
    get:
      tags:
      - connector
      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: 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
      - 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

          Supported values include: `full`, `incremental`, `access_control`

        deprecated: false
        schema:
          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
      x-codeSamples:
      - lang: Console
        source: 'GET _connector/_sync_job?connector_id=my-connector-id&size=1

          '
      - lang: Python
        source: |-
          resp = client.connector.sync_job_list(
              connector_id="my-connector-id",
              size="1",
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.syncJobList({
            connector_id: "my-connector-id",
            size: 1,
          });
      - lang: Ruby
        source: |-
          response = client.connector.sync_job_list(
            connector_id: "my-connector-id",
            size: "1"
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->syncJobList([
              "connector_id" => "my-connector-id",
              "size" => "1",
          ]);
      - 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
              .connectorId("my-connector-id")
              .size(1)
          );
      x-metaTags:
      - 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: |-
                  {
                    "id": "connector-id",
                    "job_type": "full",
                    "trigger_method": "on_demand"
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Id"
                required:
                - id
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: |-
          POST _connector/_sync_job
          {
            "id": "connector-id",
            "job_type": "full",
            "trigger_method": "on_demand"
          }
      - lang: Python
        source: |-
          resp = client.connector.sync_job_post(
              id="connector-id",
              job_type="full",
              trigger_method="on_demand",
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.syncJobPost({
            id: "connector-id",
            job_type: "full",
            trigger_method: "on_demand",
          });
      - lang: Ruby
        source: |-
          response = client.connector.sync_job_post(
            body: {
              "id": "connector-id",
              "job_type": "full",
              "trigger_method": "on_demand"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->syncJobPost([
              "body" => [
                  "id" => "connector-id",
                  "job_type" => "full",
                  "trigger_method" => "on_demand",
              ],
          ]);
      - 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
              .id("connector-id")
              .jobType(SyncJobType.Full)
              .triggerMethod(SyncJobTriggerMethod.OnDemand)
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/{connector_id}/_filtering/_activate":
    put:
      tags:
      - connector
      summary: Activate the connector draft filter
      description: Activates the valid draft filtering for a connector.
      operationId: connector-update-active-filtering
      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
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                required:
                - result
      x-state: Technical preview
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/{connector_id}/_api_key_id":
    put:
      tags:
      - connector
      summary: Update the connector API key ID
      description: |-
        Update the `api_key_id` and `api_key_secret_id` fields of a connector.
        You can specify the ID of the API key used for authorization and the ID of the connector secret where the API key is stored.
        The connector secret ID is required only for Elastic managed (native) connectors.
        Self-managed connectors (connector clients) do not use this field.
      operationId: connector-update-api-key-id
      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:
                api_key_id:
                  type: string
                api_key_secret_id:
                  type: string
            examples:
              ConnectorUpdateApiKeyIDRequestExample1:
                value: |-
                  {
                      "api_key_id": "my-api-key-id",
                      "api_key_secret_id": "my-connector-secret-id"
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                required:
                - result
              examples:
                ConnectorUpdateAPIKeyIDResponseExample1:
                  value: |-
                    {
                      "result": "updated"
                    }
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _connector/my-connector/_api_key_id
          {
              "api_key_id": "my-api-key-id",
              "api_key_secret_id": "my-connector-secret-id"
          }
      - lang: Python
        source: |-
          resp = client.connector.update_api_key_id(
              connector_id="my-connector",
              api_key_id="my-api-key-id",
              api_key_secret_id="my-connector-secret-id",
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.updateApiKeyId({
            connector_id: "my-connector",
            api_key_id: "my-api-key-id",
            api_key_secret_id: "my-connector-secret-id",
          });
      - lang: Ruby
        source: |-
          response = client.connector.update_api_key_id(
            connector_id: "my-connector",
            body: {
              "api_key_id": "my-api-key-id",
              "api_key_secret_id": "my-connector-secret-id"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->updateApiKeyId([
              "connector_id" => "my-connector",
              "body" => [
                  "api_key_id" => "my-api-key-id",
                  "api_key_secret_id" => "my-connector-secret-id",
              ],
          ]);
      - 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
              .apiKeyId("my-api-key-id")
              .apiKeySecretId("my-connector-secret-id")
              .connectorId("my-connector")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/{connector_id}/_configuration":
    put:
      tags:
      - connector
      summary: Update the connector configuration
      description: Update the configuration field in the connector document.
      operationId: connector-update-configuration
      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:
                configuration:
                  allOf:
                  - "$ref": "#/components/schemas/connector._types.ConnectorConfiguration"
                values:
                  type: object
                  additionalProperties:
                    type: object
            examples:
              ConnectorUpdateConfigurationRequestExample1:
                value: |-
                  {
                      "values": {
                          "tenant_id": "my-tenant-id",
                          "tenant_name": "my-sharepoint-site",
                          "client_id": "foo",
                          "secret_value": "bar",
                          "site_collections": "*"
                      }
                  }
              ConnectorUpdateConfigurationRequestExample2:
                value: |-
                  {
                      "values": {
                          "secret_value": "foo-bar"
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                required:
                - result
              examples:
                ConnectorUpdateConfigurationResponseExample1:
                  value: |-
                    {
                      "result": "updated"
                    }
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _connector/my-spo-connector/_configuration
          {
              "values": {
                  "tenant_id": "my-tenant-id",
                  "tenant_name": "my-sharepoint-site",
                  "client_id": "foo",
                  "secret_value": "bar",
                  "site_collections": "*"
              }
          }
      - lang: Python
        source: |-
          resp = client.connector.update_configuration(
              connector_id="my-spo-connector",
              values={
                  "tenant_id": "my-tenant-id",
                  "tenant_name": "my-sharepoint-site",
                  "client_id": "foo",
                  "secret_value": "bar",
                  "site_collections": "*"
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.updateConfiguration({
            connector_id: "my-spo-connector",
            values: {
              tenant_id: "my-tenant-id",
              tenant_name: "my-sharepoint-site",
              client_id: "foo",
              secret_value: "bar",
              site_collections: "*",
            },
          });
      - lang: Ruby
        source: |-
          response = client.connector.update_configuration(
            connector_id: "my-spo-connector",
            body: {
              "values": {
                "tenant_id": "my-tenant-id",
                "tenant_name": "my-sharepoint-site",
                "client_id": "foo",
                "secret_value": "bar",
                "site_collections": "*"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->updateConfiguration([
              "connector_id" => "my-spo-connector",
              "body" => [
                  "values" => [
                      "tenant_id" => "my-tenant-id",
                      "tenant_name" => "my-sharepoint-site",
                      "client_id" => "foo",
                      "secret_value" => "bar",
                      "site_collections" => "*",
                  ],
              ],
          ]);
      - 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
              .connectorId("my-spo-connector")
              .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("\"*\"")))
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/{connector_id}/_error":
    put:
      tags:
      - connector
      summary: Update the connector error field
      description: |-
        Set the error field for the connector.
        If the error provided in the request body is non-null, the connector’s status is updated to error.
        Otherwise, if the error is reset to null, the connector status is updated to connected.
      operationId: connector-update-error
      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:
                error:
                  oneOf:
                  - type: string
                  - "$ref": "#/components/schemas/_spec_utils.NullValue"
              required:
              - error
            examples:
              ConnectorUpdateErrorRequestExample1:
                value: |-
                  {
                      "error": "Houston, we have a problem!"
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                required:
                - result
              examples:
                ConnectorUpdateErrorResponseExample1:
                  value: |-
                    {
                      "result": "updated"
                    }
      x-state: Technical preview
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _connector/my-connector/_error
          {
              "error": "Houston, we have a problem!"
          }
      - lang: Python
        source: |-
          resp = client.connector.update_error(
              connector_id="my-connector",
              error="Houston, we have a problem!",
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.updateError({
            connector_id: "my-connector",
            error: "Houston, we have a problem!",
          });
      - lang: Ruby
        source: |-
          response = client.connector.update_error(
            connector_id: "my-connector",
            body: {
              "error": "Houston, we have a problem!"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->updateError([
              "connector_id" => "my-connector",
              "body" => [
                  "error" => "Houston, we have a problem!",
              ],
          ]);
      - 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
              .connectorId("my-connector")
              .error("Houston, we have a problem!")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/{connector_id}/_filtering":
    put:
      tags:
      - connector
      summary: Update the connector filtering
      description: |-
        Update the draft filtering configuration of a connector and marks the draft validation state as edited.
        The filtering draft is activated once validated by the running Elastic connector service.
        The filtering property is used to configure sync rules (both basic and advanced) for a connector.
      operationId: connector-update-filtering
      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:
                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: |-
                  {
                      "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": ".*"
                          }
                      ]
                  }
              ConnectorUpdateFilteringRequestExample2:
                value: |-
                  {
                      "advanced_snippet": {
                          "value": [{
                              "tables": [
                                  "users",
                                  "orders"
                              ],
                              "query": "SELECT users.id AS id, orders.order_id AS order_id FROM users JOIN orders ON users.id = orders.user_id"
                          }]
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                required:
                - result
              examples:
                ConnectorUpdateFilteringResponseExample1:
                  value: |-
                    {
                      "result": "updated"
                    }
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _connector/my-g-drive-connector/_filtering
          {
              "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": ".*"
                  }
              ]
          }
      - lang: Python
        source: |-
          resp = client.connector.update_filtering(
              connector_id="my-g-drive-connector",
              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": ".*"
                  }
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.updateFiltering({
            connector_id: "my-g-drive-connector",
            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: ".*",
              },
            ],
          });
      - lang: Ruby
        source: |-
          response = client.connector.update_filtering(
            connector_id: "my-g-drive-connector",
            body: {
              "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": ".*"
                }
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->updateFiltering([
              "connector_id" => "my-g-drive-connector",
              "body" => [
                  "rules" => array(
                      [
                          "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" => ".*",
                      ],
                  ),
              ],
          ]);
      - 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
              .connectorId("my-g-drive-connector")
              .rules(List.of(FilteringRule.of(f -> f
                      .field("file_extension")
                      .id("exclude-txt-files")
                      .order(0)
                      .policy(FilteringPolicy.Exclude)
                      .rule(FilteringRuleRule.Equals)
                      .value("txt")
                  ),FilteringRule.of(f -> f
                      .field("_")
                      .id("DEFAULT")
                      .order(1)
                      .policy(FilteringPolicy.Include)
                      .rule(FilteringRuleRule.Regex)
                      .value(".*")
                  )))
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/{connector_id}/_filtering/_validation":
    put:
      tags:
      - connector
      summary: Update the connector draft filtering validation
      description: Update the draft filtering validation info for a connector.
      operationId: connector-update-filtering-validation
      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:
                validation:
                  allOf:
                  - "$ref": "#/components/schemas/connector._types.FilteringRulesValidation"
              required:
              - validation
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                required:
                - result
      x-state: Technical preview
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/{connector_id}/_index_name":
    put:
      tags:
      - connector
      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:
      - 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:
                index_name:
                  oneOf:
                  - "$ref": "#/components/schemas/_types.IndexName"
                  - "$ref": "#/components/schemas/_spec_utils.NullValue"
              required:
              - index_name
            examples:
              ConnectorUpdateIndexNameRequestExample1:
                value: |-
                  {
                      "index_name": "data-from-my-google-drive"
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                required:
                - result
              examples:
                ConnectorUpdateIndexNameResponseExample1:
                  value: |-
                    {
                      "result": "updated"
                    }
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _connector/my-connector/_index_name
          {
              "index_name": "data-from-my-google-drive"
          }
      - lang: Python
        source: |-
          resp = client.connector.update_index_name(
              connector_id="my-connector",
              index_name="data-from-my-google-drive",
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.updateIndexName({
            connector_id: "my-connector",
            index_name: "data-from-my-google-drive",
          });
      - lang: Ruby
        source: |-
          response = client.connector.update_index_name(
            connector_id: "my-connector",
            body: {
              "index_name": "data-from-my-google-drive"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->updateIndexName([
              "connector_id" => "my-connector",
              "body" => [
                  "index_name" => "data-from-my-google-drive",
              ],
          ]);
      - 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
              .connectorId("my-connector")
              .indexName("data-from-my-google-drive")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/{connector_id}/_name":
    put:
      tags:
      - connector
      summary: Update the connector name and description
      operationId: connector-update-name
      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:
                name:
                  type: string
                description:
                  type: string
            examples:
              ConnectorUpdateNameRequestExample1:
                value: |-
                  {
                      "name": "Custom connector",
                      "description": "This is my customized connector"
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                required:
                - result
              examples:
                ConnectorUpdateNameResponseExample1:
                  value: |-
                    {
                      "result": "updated"
                    }
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _connector/my-connector/_name
          {
              "name": "Custom connector",
              "description": "This is my customized connector"
          }
      - lang: Python
        source: |-
          resp = client.connector.update_name(
              connector_id="my-connector",
              name="Custom connector",
              description="This is my customized connector",
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.updateName({
            connector_id: "my-connector",
            name: "Custom connector",
            description: "This is my customized connector",
          });
      - lang: Ruby
        source: |-
          response = client.connector.update_name(
            connector_id: "my-connector",
            body: {
              "name": "Custom connector",
              "description": "This is my customized connector"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->updateName([
              "connector_id" => "my-connector",
              "body" => [
                  "name" => "Custom connector",
                  "description" => "This is my customized connector",
              ],
          ]);
      - 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
              .connectorId("my-connector")
              .description("This is my customized connector")
              .name("Custom connector")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/{connector_id}/_native":
    put:
      tags:
      - connector
      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: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                required:
                - result
      x-state: Beta
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/{connector_id}/_pipeline":
    put:
      tags:
      - connector
      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: 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:
                pipeline:
                  allOf:
                  - "$ref": "#/components/schemas/connector._types.IngestPipelineParams"
              required:
              - pipeline
            examples:
              ConnectorUpdatePipelineRequestExample1:
                value: |-
                  {
                      "pipeline": {
                          "extract_binary_content": true,
                          "name": "my-connector-pipeline",
                          "reduce_whitespace": true,
                          "run_ml_inference": true
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                required:
                - result
              examples:
                ConnectorUpdatePipelineResponseExample1:
                  value: |-
                    {
                      "result": "updated"
                    }
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _connector/my-connector/_pipeline
          {
              "pipeline": {
                  "extract_binary_content": true,
                  "name": "my-connector-pipeline",
                  "reduce_whitespace": true,
                  "run_ml_inference": true
              }
          }
      - lang: Python
        source: |-
          resp = client.connector.update_pipeline(
              connector_id="my-connector",
              pipeline={
                  "extract_binary_content": True,
                  "name": "my-connector-pipeline",
                  "reduce_whitespace": True,
                  "run_ml_inference": True
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.updatePipeline({
            connector_id: "my-connector",
            pipeline: {
              extract_binary_content: true,
              name: "my-connector-pipeline",
              reduce_whitespace: true,
              run_ml_inference: true,
            },
          });
      - lang: Ruby
        source: |-
          response = client.connector.update_pipeline(
            connector_id: "my-connector",
            body: {
              "pipeline": {
                "extract_binary_content": true,
                "name": "my-connector-pipeline",
                "reduce_whitespace": true,
                "run_ml_inference": true
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->updatePipeline([
              "connector_id" => "my-connector",
              "body" => [
                  "pipeline" => [
                      "extract_binary_content" => true,
                      "name" => "my-connector-pipeline",
                      "reduce_whitespace" => true,
                      "run_ml_inference" => true,
                  ],
              ],
          ]);
      - 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
              .connectorId("my-connector")
              .pipeline(p -> p
                  .extractBinaryContent(true)
                  .name("my-connector-pipeline")
                  .reduceWhitespace(true)
                  .runMlInference(true)
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/{connector_id}/_scheduling":
    put:
      tags:
      - connector
      summary: Update the connector scheduling
      operationId: connector-update-scheduling
      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:
                scheduling:
                  allOf:
                  - "$ref": "#/components/schemas/connector._types.SchedulingConfiguration"
              required:
              - scheduling
            examples:
              ConnectorUpdateSchedulingRequestExample1:
                value: |-
                  {
                      "scheduling": {
                          "access_control": {
                              "enabled": true,
                              "interval": "0 10 0 * * ?"
                          },
                          "full": {
                              "enabled": true,
                              "interval": "0 20 0 * * ?"
                          },
                          "incremental": {
                              "enabled": false,
                              "interval": "0 30 0 * * ?"
                          }
                      }
                  }
              ConnectorUpdateSchedulingRequestExample2:
                value: |-
                  {
                      "scheduling": {
                          "full": {
                              "enabled": true,
                              "interval": "0 10 0 * * ?"
                          }
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                required:
                - result
              examples:
                ConnectorUpdateSchedulingResponseExample1:
                  value: |-
                    {
                      "result": "updated"
                    }
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _connector/my-connector/_scheduling
          {
              "scheduling": {
                  "access_control": {
                      "enabled": true,
                      "interval": "0 10 0 * * ?"
                  },
                  "full": {
                      "enabled": true,
                      "interval": "0 20 0 * * ?"
                  },
                  "incremental": {
                      "enabled": false,
                      "interval": "0 30 0 * * ?"
                  }
              }
          }
      - lang: Python
        source: |-
          resp = client.connector.update_scheduling(
              connector_id="my-connector",
              scheduling={
                  "access_control": {
                      "enabled": True,
                      "interval": "0 10 0 * * ?"
                  },
                  "full": {
                      "enabled": True,
                      "interval": "0 20 0 * * ?"
                  },
                  "incremental": {
                      "enabled": False,
                      "interval": "0 30 0 * * ?"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.updateScheduling({
            connector_id: "my-connector",
            scheduling: {
              access_control: {
                enabled: true,
                interval: "0 10 0 * * ?",
              },
              full: {
                enabled: true,
                interval: "0 20 0 * * ?",
              },
              incremental: {
                enabled: false,
                interval: "0 30 0 * * ?",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.connector.update_scheduling(
            connector_id: "my-connector",
            body: {
              "scheduling": {
                "access_control": {
                  "enabled": true,
                  "interval": "0 10 0 * * ?"
                },
                "full": {
                  "enabled": true,
                  "interval": "0 20 0 * * ?"
                },
                "incremental": {
                  "enabled": false,
                  "interval": "0 30 0 * * ?"
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->updateScheduling([
              "connector_id" => "my-connector",
              "body" => [
                  "scheduling" => [
                      "access_control" => [
                          "enabled" => true,
                          "interval" => "0 10 0 * * ?",
                      ],
                      "full" => [
                          "enabled" => true,
                          "interval" => "0 20 0 * * ?",
                      ],
                      "incremental" => [
                          "enabled" => false,
                          "interval" => "0 30 0 * * ?",
                      ],
                  ],
              ],
          ]);
      - 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
              .connectorId("my-connector")
              .scheduling(s -> s
                  .accessControl(a -> a
                      .enabled(true)
                      .interval("0 10 0 * * ?")
                  )
                  .full(f -> f
                      .enabled(true)
                      .interval("0 20 0 * * ?")
                  )
                  .incremental(i -> i
                      .enabled(false)
                      .interval("0 30 0 * * ?")
                  )
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/{connector_id}/_service_type":
    put:
      tags:
      - connector
      summary: Update the connector service type
      operationId: connector-update-service-type
      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:
                service_type:
                  type: string
              required:
              - service_type
            examples:
              ConnectorUpdateServiceTypeRequestExample1:
                value: |-
                  {
                      "service_type": "sharepoint_online"
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                required:
                - result
              examples:
                ConnectorUpdateServiceTypeResponseExample1:
                  value: |-
                    {
                      "result": "updated"
                    }
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _connector/my-connector/_service_type
          {
              "service_type": "sharepoint_online"
          }
      - lang: Python
        source: |-
          resp = client.connector.update_service_type(
              connector_id="my-connector",
              service_type="sharepoint_online",
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.updateServiceType({
            connector_id: "my-connector",
            service_type: "sharepoint_online",
          });
      - lang: Ruby
        source: |-
          response = client.connector.update_service_type(
            connector_id: "my-connector",
            body: {
              "service_type": "sharepoint_online"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->updateServiceType([
              "connector_id" => "my-connector",
              "body" => [
                  "service_type" => "sharepoint_online",
              ],
          ]);
      - 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
              .connectorId("my-connector")
              .serviceType("sharepoint_online")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_connector/{connector_id}/_status":
    put:
      tags:
      - connector
      summary: Update the connector status
      operationId: connector-update-status
      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:
                status:
                  allOf:
                  - "$ref": "#/components/schemas/connector._types.ConnectorStatus"
              required:
              - status
            examples:
              ConnectorUpdateStatusRequestExample1:
                value: |-
                  {
                      "status": "needs_configuration"
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                required:
                - result
              examples:
                ConnectorUpdateStatusResponseExample1:
                  value: |-
                    {
                      "result": "updated"
                    }
      x-state: Technical preview
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _connector/my-connector/_status
          {
              "status": "needs_configuration"
          }
      - lang: Python
        source: |-
          resp = client.connector.update_status(
              connector_id="my-connector",
              status="needs_configuration",
          )
      - lang: JavaScript
        source: |-
          const response = await client.connector.updateStatus({
            connector_id: "my-connector",
            status: "needs_configuration",
          });
      - lang: Ruby
        source: |-
          response = client.connector.update_status(
            connector_id: "my-connector",
            body: {
              "status": "needs_configuration"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->connector()->updateStatus([
              "connector_id" => "my-connector",
              "body" => [
                  "status" => "needs_configuration",
              ],
          ]);
      - 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
              .connectorId("my-connector")
              .status(ConnectorStatus.NeedsConfiguration)
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_count":
    get:
      tags:
      - search
      summary: 'Count search results

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_count</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_count</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_count</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_count</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n## Required authorization\n\n* Index privileges:
        `read`\n"
      operationId: count
      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"
      requestBody:
        "$ref": "#/components/requestBodies/count"
      responses:
        '200':
          "$ref": "#/components/responses/count-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          GET /my-index-000001/_count
          {
            "query" : {
              "term" : { "user.id" : "kimchy" }
            }
          }
      - lang: Python
        source: |-
          resp = client.count(
              index="my-index-000001",
              query={
                  "term": {
                      "user.id": "kimchy"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.count({
            index: "my-index-000001",
            query: {
              term: {
                "user.id": "kimchy",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.count(
            index: "my-index-000001",
            body: {
              "query": {
                "term": {
                  "user.id": "kimchy"
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->count([
              "index" => "my-index-000001",
              "body" => [
                  "query" => [
                      "term" => [
                          "user.id" => "kimchy",
                      ],
                  ],
              ],
          ]);
      - 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
              .index("my-index-000001")
              .query(q -> q
                  .term(t -> t
                      .field("user.id")
                      .value(FieldValue.of("kimchy"))
                  )
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_create/{id}":
    post:
      tags:
      - document
      summary: 'Create a new document in the index

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/{index}/_create/{id}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_create/{id}</span>\n
        \                     </div>\n                    \n\nYou can index a new
        JSON document with the `/<target>/_doc/` or `/<target>/_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 `/<target>/_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 /<target>/_create/<_id>` or `POST
        /<target>/_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.\n\n##
        Required authorization\n\n* Index privileges: `create`\n"
      externalDocs:
        url: https://www.elastic.co/docs/manage-data/data-store/data-streams
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-index_.html
      operationId: create
      parameters:
      - "$ref": "#/components/parameters/create-index"
      - "$ref": "#/components/parameters/create-id"
      - "$ref": "#/components/parameters/create-include_source_on_error"
      - "$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: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT my-index-000001/_create/1
          {
            "@timestamp": "2099-11-15T13:12:00",
            "message": "GET /search HTTP/1.1 200 1070000",
            "user": {
              "id": "kimchy"
            }
          }
      - lang: Python
        source: |-
          resp = client.create(
              index="my-index-000001",
              id="1",
              document={
                  "@timestamp": "2099-11-15T13:12:00",
                  "message": "GET /search HTTP/1.1 200 1070000",
                  "user": {
                      "id": "kimchy"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.create({
            index: "my-index-000001",
            id: 1,
            document: {
              "@timestamp": "2099-11-15T13:12:00",
              message: "GET /search HTTP/1.1 200 1070000",
              user: {
                id: "kimchy",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.create(
            index: "my-index-000001",
            id: "1",
            body: {
              "@timestamp": "2099-11-15T13:12:00",
              "message": "GET /search HTTP/1.1 200 1070000",
              "user": {
                "id": "kimchy"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->create([
              "index" => "my-index-000001",
              "id" => "1",
              "body" => [
                  "@timestamp" => "2099-11-15T13:12:00",
                  "message" => "GET /search HTTP/1.1 200 1070000",
                  "user" => [
                      "id" => "kimchy",
                  ],
              ],
          ]);
      - 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
              .id("1")
              .index("my-index-000001")
              .document(JsonData.fromJson("{\"@timestamp\":\"2099-11-15T13:12:00\",\"message\":\"GET /search HTTP/1.1 200 1070000\",\"user\":{\"id\":\"kimchy\"}}"))
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{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.

        By default, this API is realtime and is not affected by the refresh rate of the index (when data will become visible for search).
        In 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.
        To turn off realtime behavior, set the `realtime` parameter to false.

        **Source filtering**

        By 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.
        You can turn off `_source` retrieval by using the `_source` parameter:

        ```
        GET my-index-000001/_doc/0?_source=false
        ```

        If 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.
        This can be helpful with large documents where partial retrieval can save on network overhead
        Both parameters take a comma separated list of fields or wildcard expressions.
        For example:

        ```
        GET my-index-000001/_doc/0?_source_includes=*.id&_source_excludes=entities
        ```

        If you only want to specify includes, you can use a shorter notation:

        ```
        GET my-index-000001/_doc/0?_source=*.id
        ```

        **Routing**

        If routing is used during indexing, the routing value also needs to be specified to retrieve a document.
        For example:

        ```
        GET my-index-000001/_doc/2?routing=user1
        ```

        This request gets the document with ID 2, but it is routed based on the user.
        The document is not fetched if the correct routing is not specified.

        **Distributed**

        The GET operation is hashed into a specific shard ID.
        It is then redirected to one of the replicas within that shard ID and returns the result.
        The replicas are the primary shard and its replicas within that shard ID group.
        This means that the more replicas you have, the better your GET scaling will be.

        **Versioning support**

        You can use the `version` parameter to retrieve the document only if its current version is equal to the specified one.

        Internally, Elasticsearch has marked the old document as deleted and added an entirely new document.
        The old version of the document doesn't disappear immediately, although you won't be able to access it.
        Elasticsearch cleans up deleted documents in the background as you continue to index more data.

        ## Required authorization

        * Index privileges: `read`
      operationId: get
      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.
          By default, the operation is randomized between the shard replicas.

          If it is set to `_local`, the operation will prefer to be run on a local allocated shard when possible.
          If 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.
          This can help with "jumping values" when hitting different shards in different refresh states.
          A 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
        style: form
      - in: query
        name: refresh
        description: |-
          If `true`, the request refreshes the relevant shards before retrieving the document.
          Setting 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 from the response.
          You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
          If 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
        style: form
      - in: query
        name: _source_includes
        description: |-
          A comma-separated list of source fields to include in the response.
          If this parameter is specified, only these source fields are returned.
          You can exclude fields from this subset using the `_source_excludes` query parameter.
          If the `_source` parameter is `false`, this parameter is ignored.
        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.
          If no fields are specified, no stored fields are included in the response.
          If this field is specified, the `_source` parameter defaults to `false`.
          Only leaf fields can be retrieved with the `stored_fields` option.
          Object fields can't be returned; if specified, the request fails.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Fields"
        style: form
      - in: query
        name: version
        description: |-
          The version number for concurrency control.
          It 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.

          Supported values include:
            - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
            - `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.
            - `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.
          NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
          If used incorrectly, it can result in loss of data.

        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.VersionType"
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_global.get.GetResult"
              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.

                    '
                  value: |-
                    {
                      "_index": "my-index-000001",
                      "_id": "0",
                      "_version": 1,
                      "_seq_no": 0,
                      "_primary_term": 1,
                      "found": true,
                      "_source": {
                        "@timestamp": "2099-11-15T14:12:12",
                        "http": {
                          "request": {
                            "method": "get"
                          },
                          "response": {
                            "status_code": 200,
                            "bytes": 1070000
                          },
                          "version": "1.1"
                        },
                        "source": {
                          "ip": "127.0.0.1"
                        },
                        "message": "GET /search HTTP/1.1 200 1070000",
                        "user": {
                          "id": "kimchy"
                        }
                      }
                    }
                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.

                    '
                  value: |-
                    {
                      "_index": "my-index-000001",
                      "_id": "1",
                      "_version": 1,
                      "_seq_no" : 22,
                      "_primary_term" : 1,
                      "found": true,
                      "fields": {
                          "tags": [
                            "production"
                          ]
                      }
                    }
                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.

                    '
                  value: |-
                    {
                      "_index": "my-index-000001",
                      "_id": "2",
                      "_version": 1,
                      "_seq_no" : 13,
                      "_primary_term" : 1,
                      "_routing": "user1",
                      "found": true,
                      "fields": {
                          "tags": [
                            "env2"
                          ]
                      }
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET my-index-000001/_doc/1?stored_fields=tags,counter

          '
      - lang: Python
        source: |-
          resp = client.get(
              index="my-index-000001",
              id="1",
              stored_fields="tags,counter",
          )
      - lang: JavaScript
        source: |-
          const response = await client.get({
            index: "my-index-000001",
            id: 1,
            stored_fields: "tags,counter",
          });
      - lang: Ruby
        source: |-
          response = client.get(
            index: "my-index-000001",
            id: "1",
            stored_fields: "tags,counter"
          )
      - lang: PHP
        source: |-
          $resp = $client->get([
              "index" => "my-index-000001",
              "id" => "1",
              "stored_fields" => "tags,counter",
          ]);
      - 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
              .id("1")
              .index("my-index-000001")
              .storedFields(List.of("tags","counter"))
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    post:
      tags:
      - document
      summary: 'Create or update a document in an index

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_doc</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/{index}/_doc/{id}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_doc/{id}</span>\n
        \                     </div>\n                    \n\nAdd 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 /<target>/_doc/<_id>` request format, you must have
        the `create`, `index`, or `write` index privilege.\n* To add a document using
        the `POST /<target>/_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.\n\n## Required authorization\n\n* Index privileges: `index`\n"
      externalDocs:
        url: https://www.elastic.co/docs/manage-data/data-store/data-streams
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-index_.html
      operationId: index
      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"
      - "$ref": "#/components/parameters/index-wait_for_active_shards"
      - "$ref": "#/components/parameters/index-require_alias"
      - "$ref": "#/components/parameters/index-require_data_stream"
      requestBody:
        "$ref": "#/components/requestBodies/index"
      responses:
        '200':
          "$ref": "#/components/responses/index-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST my-index-000001/_doc/
          {
            "@timestamp": "2099-11-15T13:12:00",
            "message": "GET /search HTTP/1.1 200 1070000",
            "user": {
              "id": "kimchy"
            }
          }
      - lang: Python
        source: |-
          resp = client.index(
              index="my-index-000001",
              document={
                  "@timestamp": "2099-11-15T13:12:00",
                  "message": "GET /search HTTP/1.1 200 1070000",
                  "user": {
                      "id": "kimchy"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.index({
            index: "my-index-000001",
            document: {
              "@timestamp": "2099-11-15T13:12:00",
              message: "GET /search HTTP/1.1 200 1070000",
              user: {
                id: "kimchy",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.index(
            index: "my-index-000001",
            body: {
              "@timestamp": "2099-11-15T13:12:00",
              "message": "GET /search HTTP/1.1 200 1070000",
              "user": {
                "id": "kimchy"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->index([
              "index" => "my-index-000001",
              "body" => [
                  "@timestamp" => "2099-11-15T13:12:00",
                  "message" => "GET /search HTTP/1.1 200 1070000",
                  "user" => [
                      "id" => "kimchy",
                  ],
              ],
          ]);
      - 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
              .index("my-index-000001")
              .document(JsonData.fromJson("{\"@timestamp\":\"2099-11-15T13:12:00\",\"message\":\"GET /search HTTP/1.1 200 1070000\",\"user\":{\"id\":\"kimchy\"}}"))
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - document
      summary: Delete a document
      description: |
        Remove a JSON document from the specified index.

        NOTE: You cannot send deletion requests directly to a data stream.
        To delete a document in a data stream, you must target the backing index containing the document.

        **Optimistic concurrency control**

        Delete 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.
        If a mismatch is detected, the operation will result in a `VersionConflictException` and a status code of `409`.

        **Versioning**

        Each document indexed is versioned.
        When 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.
        Every write operation run on a document, deletes included, causes its version to be incremented.
        The version number of a deleted document remains available for a short time after deletion to allow for control of concurrent operations.
        The length of time for which a deleted document's version remains available is determined by the `index.gc_deletes` index setting.

        **Routing**

        If routing is used during indexing, the routing value also needs to be specified to delete a document.

        If the `_routing` mapping is set to `required` and no routing value is specified, the delete API throws a `RoutingMissingException` and rejects the request.

        For example:

        ```
        DELETE /my-index-000001/_doc/1?routing=shard-1
        ```

        This request deletes the document with ID 1, but it is routed based on the user.
        The document is not deleted if the correct routing is not specified.

        **Distributed**

        The delete operation gets hashed into a specific shard ID.
        It then gets redirected into the primary shard within that ID group and replicated (if needed) to shard replicas within that ID group.

        ## Required authorization

        * Index privileges: `delete`
      operationId: delete
      parameters:
      - in: path
        name: index
        description: The name of the target index.
        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: 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: refresh
        description: |-
          If `true`, Elasticsearch refreshes the affected shards to make this operation visible to search.
          If `wait_for`, it waits for a refresh to make this operation visible to search.
          If `false`, it does nothing with refreshes.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Refresh"
        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 active shards.

          This parameter is useful for situations where the primary shard assigned to perform the delete operation might not be available when the delete operation runs.
          Some reasons for this might be that the primary shard is currently recovering from a store or undergoing relocation.
          By 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
      - in: query
        name: version
        description: |-
          An explicit version number for concurrency control.
          It 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.

          Supported values include:
            - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
            - `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.
            - `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.
          NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
          If used incorrectly, it can result in loss of data.

        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.VersionType"
        style: form
      - in: query
        name: wait_for_active_shards
        description: |-
          The minimum number of shard copies that must be active before proceeding with the operation.
          You can set it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
          The default value of `1` means it waits for each primary shard to be active.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.WaitForActiveShards"
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$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: |-
                    {
                      "_shards": {
                        "total": 2,
                        "failed": 0,
                        "successful": 2
                      },
                      "_index": "my-index-000001",
                      "_id": "1",
                      "_version": 2,
                      "_primary_term": 1,
                      "_seq_no": 5,
                      "result": "deleted"
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE /my-index-000001/_doc/1

          '
      - lang: Python
        source: |-
          resp = client.delete(
              index="my-index-000001",
              id="1",
          )
      - lang: JavaScript
        source: |-
          const response = await client.delete({
            index: "my-index-000001",
            id: 1,
          });
      - lang: Ruby
        source: |-
          response = client.delete(
            index: "my-index-000001",
            id: "1"
          )
      - lang: PHP
        source: |-
          $resp = $client->delete([
              "index" => "my-index-000001",
              "id" => "1",
          ]);
      - 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
              .id("1")
              .index("my-index-000001")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    head:
      tags:
      - document
      summary: Check a document
      description: |-
        Verify that a document exists.
        For example, check to see if a document with the `_id` 0 exists:

        ```
        HEAD my-index-000001/_doc/0
        ```

        If the document exists, the API returns a status code of `200 - OK`.
        If the document doesn’t exist, the API returns `404 - Not Found`.

        **Versioning support**

        You can use the `version` parameter to check the document only if its current version is equal to the specified one.

        Internally, Elasticsearch has marked the old document as deleted and added an entirely new document.
        The old version of the document doesn't disappear immediately, although you won't be able to access it.
        Elasticsearch cleans up deleted documents in the background as you continue to index more data.
      operationId: exists
      parameters:
      - in: path
        name: index
        description: |-
          A comma-separated list of data streams, indices, and aliases.
          It supports wildcards (`*`).
        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.
          By default, the operation is randomized between the shard replicas.

          If it is set to `_local`, the operation will prefer to be run on a local allocated shard when possible.
          If 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.
          This can help with "jumping values" when hitting different shards in different refresh states.
          A 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
        style: form
      - in: query
        name: refresh
        description: |-
          If `true`, the request refreshes the relevant shards before retrieving the document.
          Setting 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 from the response.
          You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
          If the `_source` parameter is `false`, this parameter is ignored.
        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.
          If this parameter is specified, only these source fields are returned.
          You can exclude fields from this subset using the `_source_excludes` query parameter.
          If the `_source` parameter is `false`, this parameter is ignored.
        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.
          If no fields are specified, no stored fields are included in the response.
          If this field is specified, the `_source` parameter defaults to `false`.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Fields"
        style: form
      - in: query
        name: version
        description: |-
          Explicit version number for concurrency control.
          The specified version 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.

          Supported values include:
            - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
            - `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.
            - `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.
          NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
          If used incorrectly, it can result in loss of data.

        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.VersionType"
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json: {}
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'HEAD my-index-000001/_doc/0

          '
      - lang: Python
        source: |-
          resp = client.exists(
              index="my-index-000001",
              id="0",
          )
      - lang: JavaScript
        source: |-
          const response = await client.exists({
            index: "my-index-000001",
            id: 0,
          });
      - lang: Ruby
        source: |-
          response = client.exists(
            index: "my-index-000001",
            id: "0"
          )
      - lang: PHP
        source: |-
          $resp = $client->exists([
              "index" => "my-index-000001",
              "id" => "0",
          ]);
      - 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
              .id("0")
              .index("my-index-000001")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_delete_by_query":
    post:
      tags:
      - document
      summary: Delete documents
      description: |
        Deletes documents that match the specified query.

        If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:

        * `read`
        * `delete` or `write`

        You can specify the query criteria in the request URI or the request body using the same syntax as the search API.
        When 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.
        If 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.

        NOTE: 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.

        While processing a delete by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents to delete.
        A bulk delete request is performed for each batch of matching documents.
        If a search or bulk request is rejected, the requests are retried up to 10 times, with exponential back off.
        If the maximum retry limit is reached, processing halts and all failed requests are returned in the response.
        Any delete requests that completed successfully still stick, they are not rolled back.

        You can opt to count version conflicts instead of halting and returning by setting `conflicts` to `proceed`.
        Note 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.

        **Throttling delete requests**

        To control the rate at which delete by query issues batches of delete operations, you can set `requests_per_second` to any positive decimal number.
        This pads each batch with a wait time to throttle the rate.
        Set `requests_per_second` to `-1` to disable throttling.

        Throttling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.
        The padding time is the difference between the batch size divided by the `requests_per_second` and the time spent writing.
        By default the batch size is `1000`, so if `requests_per_second` is set to `500`:

        ```
        target_time = 1000 / 500 per second = 2 seconds
        wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds
        ```

        Since 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.
        This is "bursty" instead of "smooth".

        **Slicing**

        Delete by query supports sliced scroll to parallelize the delete process.
        This can improve efficiency and provide a convenient way to break the request down into smaller parts.

        Setting `slices` to `auto` lets Elasticsearch choose the number of slices to use.
        This setting will use one slice per shard, up to a certain limit.
        If 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.
        Adding slices to the delete by query operation creates sub-requests which means it has some quirks:

        * You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices.
        * Fetching the status of the task for the request with slices only contains the status of completed slices.
        * These sub-requests are individually addressable for things like cancellation and rethrottling.
        * Rethrottling the request with `slices` will rethrottle the unfinished sub-request proportionally.
        * Canceling the request with `slices` will cancel each sub-request.
        * 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.
        * 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.
        * 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.

        If you're slicing manually or otherwise tuning automatic slicing, keep in mind that:

        * 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.
        * Delete performance scales linearly across available resources with the number of slices.

        Whether query or delete performance dominates the runtime depends on the documents being reindexed and cluster resources.

        **Cancel a delete by query operation**

        Any delete by query can be canceled using the task cancel API. For example:

        ```
        POST _tasks/r1A2WoRbTwKZ516z6NEs5A:36619/_cancel
        ```

        The task ID can be found by using the get tasks API.

        Cancellation should happen quickly but might take a few seconds.
        The 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.

        ## Required authorization

        * Index privileges: `read`,`delete`
      operationId: delete-by-query
      parameters:
      - in: path
        name: index
        description: |-
          A comma-separated list of data streams, indices, and aliases to search.
          It supports wildcards (`*`).
          To 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.
          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
      - in: query
        name: analyzer
        description: |-
          Analyzer to use for the query string.
          This 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.
          This 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: |+
          What to do if delete by query hits version conflicts: `abort` or `proceed`.

          Supported values include:
            - `abort`: Stop reindexing if there are conflicts.
            - `proceed`: Continue reindexing even if there are conflicts.

        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`.
          This 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.
          This 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.
          If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
          It supports comma-separated values, such as `open,hidden`.

          Supported values include:
            - `all`: Match any data stream or index, including hidden ones.
            - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
            - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
            - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
            - `none`: Wildcard expressions are not accepted.

        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.
          This 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.
          Defaults to all documents.
          When 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.
          It is random by default.
        deprecated: false
        schema:
          type: string
        style: form
      - in: query
        name: refresh
        description: |-
          If `true`, Elasticsearch refreshes all shards involved in the delete by query after the request completes.
          This is different than the delete API's `refresh` parameter, which causes just the shard that received the delete request to be refreshed.
          Unlike the delete API, it does not support `wait_for`.
        deprecated: false
        schema:
          type: boolean
        style: form
      - in: query
        name: request_cache
        description: |-
          If `true`, the request cache is used for this request.
          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: q
        description: A query in the Lucene query string syntax.
        deprecated: false
        schema:
          type: string
        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: |-
          The explicit timeout for each search request.
          It defaults to 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`.

          Supported values include:
            - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.
            - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.

        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 `<field>:<direction>` pairs.
        deprecated: true
        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.
          If a query reaches this limit, Elasticsearch terminates the query early.
          Elasticsearch collects documents before sorting.

          Use with caution.
          Elasticsearch applies this parameter to each shard handling the request.
          When possible, let Elasticsearch perform early termination automatically.
          Avoid 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 deletion request waits for active shards.
        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: wait_for_active_shards
        description: |-
          The number of shard copies that must be active before proceeding with the operation.
          Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
          The `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
      - in: query
        name: wait_for_completion
        description: |-
          If `true`, the request blocks until the operation is complete.
          If `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
      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: |-
                  {
                    "query": {
                      "match_all": {}
                    }
                  }
              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: |-
                  {
                    "query": {
                      "term": {
                        "user.id": "kimchy"
                      }
                    },
                    "max_docs": 1
                  }
              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.

                  '
                value: |-
                  {
                    "slice": {
                      "id": 0,
                      "max": 2
                    },
                    "query": {
                      "range": {
                        "http.response.bytes": {
                          "lt": 2000000
                        }
                      }
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "query": {
                      "range": {
                        "http.response.bytes": {
                          "lt": 2000000
                        }
                      }
                    }
                  }
        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.
                      If this array is not empty, the request ended abnormally because of those failures.
                      Delete 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.
                      You 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.
                      It 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.
                      `bulk` is the number of bulk actions retried.
                      `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.
                      It 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: |-
                    {
                      "took" : 147,
                      "timed_out": false,
                      "total": 119,
                      "deleted": 119,
                      "batches": 1,
                      "version_conflicts": 0,
                      "noops": 0,
                      "retries": {
                        "bulk": 0,
                        "search": 0
                      },
                      "throttled_millis": 0,
                      "requests_per_second": -1.0,
                      "throttled_until_millis": 0,
                      "failures" : [ ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST /my-index-000001,my-index-000002/_delete_by_query
          {
            "query": {
              "match_all": {}
            }
          }
      - lang: Python
        source: |-
          resp = client.delete_by_query(
              index="my-index-000001,my-index-000002",
              query={
                  "match_all": {}
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.deleteByQuery({
            index: "my-index-000001,my-index-000002",
            query: {
              match_all: {},
            },
          });
      - lang: Ruby
        source: |-
          response = client.delete_by_query(
            index: "my-index-000001,my-index-000002",
            body: {
              "query": {
                "match_all": {}
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->deleteByQuery([
              "index" => "my-index-000001,my-index-000002",
              "body" => [
                  "query" => [
                      "match_all" => new ArrayObject([]),
                  ],
              ],
          ]);
      - 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
              .index(List.of("my-index-000001","my-index-000002"))
              .query(q -> q
                  .matchAll(m -> m)
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_scripts/{id}":
    get:
      tags:
      - script
      summary: Get a script or search template
      description: |
        Retrieves a stored script or search template.

        ## Required authorization

        * Cluster privileges: `manage`
      operationId: get-script
      parameters:
      - 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
      - in: query
        name: master_timeout
        description: |-
          The period to wait for the master node.
          If the master node is not available before the timeout expires, the request fails and returns an error.
          It 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:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Id"
                  found:
                    type: boolean
                  script:
                    allOf:
                    - "$ref": "#/components/schemas/_types.StoredScript"
                required:
                - _id
                - found
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _scripts/my-search-template

          '
      - lang: Python
        source: |-
          resp = client.get_script(
              id="my-search-template",
          )
      - lang: JavaScript
        source: |-
          const response = await client.getScript({
            id: "my-search-template",
          });
      - lang: Ruby
        source: |-
          response = client.get_script(
            id: "my-search-template"
          )
      - lang: PHP
        source: |-
          $resp = $client->getScript([
              "id" => "my-search-template",
          ]);
      - 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
              .id("my-search-template")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - script
      summary: Delete a script or search template
      description: |
        Deletes a stored script or search template.

        ## Required authorization

        * Cluster privileges: `manage`
      operationId: delete-script
      parameters:
      - 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
      - in: query
        name: master_timeout
        description: |-
          The 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.
          It 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.
          If no response is received before the timeout expires, the request fails and returns an error.
          It 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"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _scripts/my-search-template

          '
      - lang: Python
        source: |-
          resp = client.delete_script(
              id="my-search-template",
          )
      - lang: JavaScript
        source: |-
          const response = await client.deleteScript({
            id: "my-search-template",
          });
      - lang: Ruby
        source: |-
          response = client.delete_script(
            id: "my-search-template"
          )
      - lang: PHP
        source: |-
          $resp = $client->deleteScript([
              "id" => "my-search-template",
          ]);
      - 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
              .id("my-search-template")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_enrich/policy/{name}":
    get:
      tags:
      - enrich
      summary: 'Get an enrich policy

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_enrich/policy</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_enrich/policy/{name}</span>\n
        \                     </div>\n                    \n\nReturns 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"
      responses:
        '200':
          "$ref": "#/components/responses/enrich.get_policy-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_enrich/policy/my-policy

          '
      - lang: Python
        source: |-
          resp = client.enrich.get_policy(
              name="my-policy",
          )
      - lang: JavaScript
        source: |-
          const response = await client.enrich.getPolicy({
            name: "my-policy",
          });
      - lang: Ruby
        source: |-
          response = client.enrich.get_policy(
            name: "my-policy"
          )
      - lang: PHP
        source: |-
          $resp = $client->enrich()->getPolicy([
              "name" => "my-policy",
          ]);
      - 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
              .name("my-policy")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    put:
      tags:
      - enrich
      summary: Create an enrich policy
      description: Creates an enrich policy.
      operationId: enrich-put-policy
      parameters:
      - 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
      - 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: |-
                  {
                    "geo_match": {
                      "indices": "postal_codes",
                      "match_field": "location",
                      "enrich_fields": [ "location", "postal_code" ]
                    }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT /_enrich/policy/postal_policy
          {
            "geo_match": {
              "indices": "postal_codes",
              "match_field": "location",
              "enrich_fields": [ "location", "postal_code" ]
            }
          }
      - lang: Python
        source: |-
          resp = client.enrich.put_policy(
              name="postal_policy",
              geo_match={
                  "indices": "postal_codes",
                  "match_field": "location",
                  "enrich_fields": [
                      "location",
                      "postal_code"
                  ]
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.enrich.putPolicy({
            name: "postal_policy",
            geo_match: {
              indices: "postal_codes",
              match_field: "location",
              enrich_fields: ["location", "postal_code"],
            },
          });
      - lang: Ruby
        source: |-
          response = client.enrich.put_policy(
            name: "postal_policy",
            body: {
              "geo_match": {
                "indices": "postal_codes",
                "match_field": "location",
                "enrich_fields": [
                  "location",
                  "postal_code"
                ]
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->enrich()->putPolicy([
              "name" => "postal_policy",
              "body" => [
                  "geo_match" => [
                      "indices" => "postal_codes",
                      "match_field" => "location",
                      "enrich_fields" => array(
                          "location",
                          "postal_code",
                      ),
                  ],
              ],
          ]);
      - 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
              .geoMatch(g -> g
                  .enrichFields(List.of("location","postal_code"))
                  .indices("postal_codes")
                  .matchField("location")
              )
              .name("postal_policy")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - enrich
      summary: Delete an enrich policy
      description: Deletes an existing enrich policy and its enrich index.
      operationId: enrich-delete-policy
      parameters:
      - in: path
        name: name
        description: Enrich policy to delete.
        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
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE /_enrich/policy/my-policy

          '
      - lang: Python
        source: |-
          resp = client.enrich.delete_policy(
              name="my-policy",
          )
      - lang: JavaScript
        source: |-
          const response = await client.enrich.deletePolicy({
            name: "my-policy",
          });
      - lang: Ruby
        source: |-
          response = client.enrich.delete_policy(
            name: "my-policy"
          )
      - lang: PHP
        source: |-
          $resp = $client->enrich()->deletePolicy([
              "name" => "my-policy",
          ]);
      - 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
              .name("my-policy")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_enrich/policy/{name}/_execute":
    put:
      tags:
      - enrich
      summary: Run an enrich policy
      description: Create the enrich index for an existing enrich policy.
      operationId: enrich-execute-policy
      parameters:
      - in: path
        name: name
        description: Enrich policy to execute.
        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
      - 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
      responses:
        '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-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'PUT /_enrich/policy/my-policy/_execute?wait_for_completion=false

          '
      - lang: Python
        source: |-
          resp = client.enrich.execute_policy(
              name="my-policy",
              wait_for_completion=False,
          )
      - lang: JavaScript
        source: |-
          const response = await client.enrich.executePolicy({
            name: "my-policy",
            wait_for_completion: "false",
          });
      - lang: Ruby
        source: |-
          response = client.enrich.execute_policy(
            name: "my-policy",
            wait_for_completion: "false"
          )
      - lang: PHP
        source: |-
          $resp = $client->enrich()->executePolicy([
              "name" => "my-policy",
              "wait_for_completion" => "false",
          ]);
      - 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
              .name("my-policy")
              .waitForCompletion(false)
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_eql/search/{id}":
    get:
      tags:
      - eql
      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:
      - in: path
        name: id
        description: Identifier for the search.
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Id"
        style: simple
      - in: query
        name: keep_alive
        description: |-
          Period for which the search and its results are stored on the cluster.
          Defaults to the keep_alive value set by the search’s EQL search API request.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Duration"
        style: form
      - 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':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/eql._types.EqlSearchResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=?wait_for_completion_timeout=2s

          '
      - lang: Python
        source: |-
          resp = client.eql.get(
              id="FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
              wait_for_completion_timeout="2s",
          )
      - lang: JavaScript
        source: |-
          const response = await client.eql.get({
            id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
            wait_for_completion_timeout: "2s",
          });
      - lang: Ruby
        source: |-
          response = client.eql.get(
            id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
            wait_for_completion_timeout: "2s"
          )
      - lang: PHP
        source: |-
          $resp = $client->eql()->get([
              "id" => "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
              "wait_for_completion_timeout" => "2s",
          ]);
      - 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
              .id("FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=")
              .waitForCompletionTimeout(w -> w
                  .offset(2)
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - eql
      summary: Delete an async EQL search
      description: |-
        Delete an async EQL search or a stored synchronous EQL search.
        The API also deletes results for the search.
      operationId: eql-delete
      parameters:
      - in: path
        name: id
        description: |-
          Identifier for the search to delete.
          A search ID is provided in the EQL search API's response for an async search.
          A 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: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE /_eql/search/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=

          '
      - lang: Python
        source: |-
          resp = client.eql.delete(
              id="FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
          )
      - lang: JavaScript
        source: |-
          const response = await client.eql.delete({
            id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
          });
      - lang: Ruby
        source: |-
          response = client.eql.delete(
            id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE="
          )
      - lang: PHP
        source: |-
          $resp = $client->eql()->delete([
              "id" => "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
          ]);
      - 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
              .id("FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_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:
                    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: |-
                    {
                      "id": "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
                      "is_running" : true,
                      "is_partial" : true,
                      "start_time_in_millis" : 1611690235000,
                      "expiration_time_in_millis" : 1611690295000
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_eql/search/status/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=

          '
      - lang: Python
        source: |-
          resp = client.eql.get_status(
              id="FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
          )
      - lang: JavaScript
        source: |-
          const response = await client.eql.getStatus({
            id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
          });
      - lang: Ruby
        source: |-
          response = client.eql.get_status(
            id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE="
          )
      - lang: PHP
        source: |-
          $resp = $client->eql()->getStatus([
              "id" => "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
          ]);
      - 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
              .id("FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_eql/search":
    post:
      tags:
      - eql
      summary: 'Get EQL search results

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_eql/search</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_eql/search</span>\n
        \                     </div>\n                    \n\nReturns 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
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/eql-search-api.html
      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-ccs_minimize_roundtrips"
      - "$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: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          GET /my-data-stream/_eql/search
          {
            "query": """
              process where (process.name == "cmd.exe" and process.pid != 2013)
            """
          }
      - lang: Python
        source: |-
          resp = client.eql.search(
              index="my-data-stream",
              query="\n    process where (process.name == \"cmd.exe\" and process.pid != 2013)\n  ",
          )
      - lang: JavaScript
        source: |-
          const response = await client.eql.search({
            index: "my-data-stream",
            query:
              '\n    process where (process.name == "cmd.exe" and process.pid != 2013)\n  ',
          });
      - lang: Ruby
        source: |-
          response = client.eql.search(
            index: "my-data-stream",
            body: {
              "query": "\n    process where (process.name == \"cmd.exe\" and process.pid != 2013)\n  "
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->eql()->search([
              "index" => "my-data-stream",
              "body" => [
                  "query" => "\n    process where (process.name == \"cmd.exe\" and process.pid != 2013)\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
              .index("my-data-stream")
              .query("
              process where (process.name == "cmd.exe" and process.pid != 2013)
            ")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_query/queries/{id}":
    get:
      tags:
      - esql
      summary: Get a specific running ES|QL query information
      description: |
        Returns an object extended information about a running ES|QL query.

        ## Required authorization

        * Cluster privileges: `monitor_esql`
      operationId: esql-get-query
      parameters:
      - in: path
        name: id
        description: The query ID
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Id"
        style: simple
      responses:
        '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: Technical preview
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_query/queries":
    get:
      tags:
      - esql
      summary: Get running ES|QL queries information
      description: |
        Returns an object containing IDs and other information about the running ES|QL queries.

        ## Required authorization

        * Cluster privileges: `monitor_esql`
      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
      x-state: Technical preview
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_query":
    post:
      tags:
      - esql
      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
      parameters:
      - in: query
        name: format
        description: |-
          A short version of the Accept header, e.g. json, yaml.

          `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
      - 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
      - in: query
        name: drop_null_columns
        description: |-
          Should columns that are entirely `null` be removed from the `columns` and `values` portion of the results?
          Defaults 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
      - 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.
          If `false`, the query will fail if there are any failures.

          To 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
                  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
                    with information on how the query was executed. This information is for human debugging
                    and its format can change at any time but it can give some insight into the performance
                    of 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
                    name 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`
                    object with information about the clusters that participated in the search along with info such as shards
                    count.
                  default: false
                  type: boolean
                include_execution_metadata:
                  description: |-
                    When set to `true`, the response will include an extra `_clusters`
                    object with information about the clusters that participated in the search along with info such as shards
                    count.
                    This 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: |-
                  {
                    "query": """
                      FROM library,remote-*:library
                      | EVAL year = DATE_TRUNC(1 YEARS, release_date)
                      | STATS MAX(page_count) BY year
                      | SORT year
                      | LIMIT 5
                    """,
                    "include_ccs_metadata": true
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/esql._types.EsqlResult"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST /_query
          {
            "query": """
              FROM library,remote-*:library
              | EVAL year = DATE_TRUNC(1 YEARS, release_date)
              | STATS MAX(page_count) BY year
              | SORT year
              | LIMIT 5
            """,
            "include_ccs_metadata": true
          }
      - lang: Python
        source: |-
          resp = client.esql.query(
              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,
          )
      - lang: JavaScript
        source: |-
          const response = await client.esql.query({
            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,
          });
      - lang: Ruby
        source: |-
          response = client.esql.query(
            body: {
              "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
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->esql()->query([
              "body" => [
                  "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,
              ],
          ]);
      - 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
              .includeCcsMetadata(true)
              .query("
              FROM library,remote-*:library
              | EVAL year = DATE_TRUNC(1 YEARS, release_date)
              | STATS MAX(page_count) BY year
              | SORT year
              | LIMIT 5
            ")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_source/{id}":
    get:
      tags:
      - document
      summary: Get a document's source
      description: |
        Get the source of a document.
        For example:

        ```
        GET my-index-000001/_source/1
        ```

        You can use the source filtering parameters to control which parts of the `_source` are returned:

        ```
        GET my-index-000001/_source/1/?_source_includes=*.id&_source_excludes=entities
        ```

        ## Required authorization

        * Index privileges: `read`
      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.18/docs-get.html
      operationId: get-source
      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.
          By 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.
          Setting 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.
          It 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.

          Supported values include:
            - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
            - `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.
            - `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.
          NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
          If used incorrectly, it can result in loss of data.

        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.VersionType"
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET my-index-000001/_source/1

          '
      - lang: Python
        source: |-
          resp = client.get_source(
              index="my-index-000001",
              id="1",
          )
      - lang: JavaScript
        source: |-
          const response = await client.getSource({
            index: "my-index-000001",
            id: 1,
          });
      - lang: Ruby
        source: |-
          response = client.get_source(
            index: "my-index-000001",
            id: "1"
          )
      - lang: PHP
        source: |-
          $resp = $client->getSource([
              "index" => "my-index-000001",
              "id" => "1",
          ]);
      - 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
              .id("1")
              .index("my-index-000001")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    head:
      tags:
      - document
      summary: Check for a document source
      description: |
        Check whether a document source exists in an index.
        For example:

        ```
        HEAD my-index-000001/_source/1
        ```

        A document's source is not available if it is disabled in the mapping.

        ## Required authorization

        * Index privileges: `read`
      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.18/docs-get.html
      operationId: exists-source
      parameters:
      - in: path
        name: index
        description: |-
          A comma-separated list of data streams, indices, and aliases.
          It 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.
        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.
          By 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.
          Setting 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.
          It 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.

          Supported values include:
            - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
            - `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.
            - `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.
          NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
          If used incorrectly, it can result in loss of data.

        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.VersionType"
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json: {}
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'HEAD my-index-000001/_source/1

          '
      - lang: Python
        source: |-
          resp = client.exists_source(
              index="my-index-000001",
              id="1",
          )
      - lang: JavaScript
        source: |-
          const response = await client.existsSource({
            index: "my-index-000001",
            id: 1,
          });
      - lang: Ruby
        source: |-
          response = client.exists_source(
            index: "my-index-000001",
            id: "1"
          )
      - lang: PHP
        source: |-
          $resp = $client->existsSource([
              "index" => "my-index-000001",
              "id" => "1",
          ]);
      - 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
              .id("1")
              .index("my-index-000001")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_explain/{id}":
    post:
      tags:
      - search
      summary: 'Explain a document match result

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_explain/{id}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_explain/{id}</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n## Required authorization\n\n*
        Index privileges: `read`\n"
      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"
      responses:
        '200':
          "$ref": "#/components/responses/explain-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          GET /my-index-000001/_explain/0
          {
            "query" : {
              "match" : { "message" : "elasticsearch" }
            }
          }
      - lang: Python
        source: |-
          resp = client.explain(
              index="my-index-000001",
              id="0",
              query={
                  "match": {
                      "message": "elasticsearch"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.explain({
            index: "my-index-000001",
            id: 0,
            query: {
              match: {
                message: "elasticsearch",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.explain(
            index: "my-index-000001",
            id: "0",
            body: {
              "query": {
                "match": {
                  "message": "elasticsearch"
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->explain([
              "index" => "my-index-000001",
              "id" => "0",
              "body" => [
                  "query" => [
                      "match" => [
                          "message" => "elasticsearch",
                      ],
                  ],
              ],
          ]);
      - 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
              .id("0")
              .index("my-index-000001")
              .query(q -> q
                  .match(m -> m
                      .field("message")
                      .query(FieldValue.of("elasticsearch"))
                  )
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_field_caps":
    post:
      tags:
      - search
      summary: 'Get the field capabilities

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_field_caps</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_field_caps</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_field_caps</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_field_caps</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n## Required authorization\n\n* Index privileges: `view_index_metadata`,`read`\n"
      operationId: field-caps
      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"
      requestBody:
        "$ref": "#/components/requestBodies/field_caps"
      responses:
        '200':
          "$ref": "#/components/responses/field_caps-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST my-index-*/_field_caps?fields=rating
          {
            "index_filter": {
              "range": {
                "@timestamp": {
                  "gte": "2018"
                }
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.field_caps(
              index="my-index-*",
              fields="rating",
              index_filter={
                  "range": {
                      "@timestamp": {
                          "gte": "2018"
                      }
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.fieldCaps({
            index: "my-index-*",
            fields: "rating",
            index_filter: {
              range: {
                "@timestamp": {
                  gte: "2018",
                },
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.field_caps(
            index: "my-index-*",
            fields: "rating",
            body: {
              "index_filter": {
                "range": {
                  "@timestamp": {
                    "gte": "2018"
                  }
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->fieldCaps([
              "index" => "my-index-*",
              "fields" => "rating",
              "body" => [
                  "index_filter" => [
                      "range" => [
                          "@timestamp" => [
                              "gte" => "2018",
                          ],
                      ],
                  ],
              ],
          ]);
      - 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
              .fields("rating")
              .index("my-index-*")
              .indexFilter(i -> i
                  .range(r -> r
                      .untyped(u -> u
                          .field("@timestamp")
                          .gte(JsonData.fromJson("\"2018\""))
                      )
                  )
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_block/{block}":
    put:
      tags:
      - indices
      summary: Add an index block
      description: |-
        Add an index block to an index.
        Index blocks limit the operations allowed on an index by blocking specific operation types.
      operationId: indices-add-block
      parameters:
      - in: path
        name: index
        description: |-
          A comma-separated list or wildcard expression of index names used to limit the request.
          By default, you must explicitly name the indices you are adding blocks to.
          To allow the adding of blocks to indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`.
          You 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
      - in: path
        name: block
        description: |+
          The block type to add to the index.

          Supported values include:
            - `metadata`: Disable metadata changes, such as closing the index.
            - `read`: Disable read operations.
            - `read_only`: Disable write operations and metadata changes.
            - `write`: Disable write operations. However, metadata changes are still allowed.

        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/indices._types.IndicesBlockOptions"
        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.
          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
      - 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.
          It supports comma-separated values, such as `open,hidden`.

          Supported values include:
            - `all`: Match any data stream or index, including hidden ones.
            - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
            - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
            - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
            - `none`: Wildcard expressions are not accepted.

        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: |-
          The period to wait for the master node.
          If the master node is not available before the timeout expires, the request fails and returns an error.
          It 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.
          If 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.
          It 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:
                  acknowledged:
                    type: boolean
                  shards_acknowledged:
                    type: boolean
                  indices:
                    type: array
                    items:
                      "$ref": "#/components/schemas/indices.add_block.AddIndicesBlockStatus"
                required:
                - acknowledged
                - shards_acknowledged
                - indices
              examples:
                IndicesAddBlockResponseExample1:
                  description: A successful response from `PUT /my-index-000001/_block/write`,
                    which adds an index block to an index.'
                  value: |-
                    {
                      "acknowledged" : true,
                      "shards_acknowledged" : true,
                      "indices" : [ {
                        "name" : "my-index-000001",
                        "blocked" : true
                      } ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'PUT /my-index-000001/_block/write

          '
      - lang: Python
        source: |-
          resp = client.indices.add_block(
              index="my-index-000001",
              block="write",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.addBlock({
            index: "my-index-000001",
            block: "write",
          });
      - lang: Ruby
        source: |-
          response = client.indices.add_block(
            index: "my-index-000001",
            block: "write"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->addBlock([
              "index" => "my-index-000001",
              "block" => "write",
          ]);
      - 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
              .block(IndicesBlockOptions.Write)
              .index("my-index-000001")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - indices
      summary: Remove an index block
      description: |
        Remove an index block from an index.
        Index blocks limit the operations allowed on an index by blocking specific operation types.

        ## Required authorization

        * Index privileges: `manage`
      operationId: indices-remove-block
      parameters:
      - in: path
        name: index
        description: |-
          A comma-separated list or wildcard expression of index names used to limit the request.
          By default, you must explicitly name the indices you are removing blocks from.
          To allow the removal of blocks from indices with `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to `false`.
          You 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
      - in: path
        name: block
        description: |+
          The block type to remove from the index.

          Supported values include:
            - `metadata`: Disable metadata changes, such as closing the index.
            - `read`: Disable read operations.
            - `read_only`: Disable write operations and metadata changes.
            - `write`: Disable write operations. However, metadata changes are still allowed.

        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/indices._types.IndicesBlockOptions"
        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.
          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
      - 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.
          It supports comma-separated values, such as `open,hidden`.

          Supported values include:
            - `all`: Match any data stream or index, including hidden ones.
            - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
            - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
            - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
            - `none`: Wildcard expressions are not accepted.

        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: |-
          The period to wait for the master node.
          If the master node is not available before the timeout expires, the request fails and returns an error.
          It 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.
          If 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.
          It 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:
                  acknowledged:
                    type: boolean
                  indices:
                    type: array
                    items:
                      "$ref": "#/components/schemas/indices.remove_block.RemoveIndicesBlockStatus"
                required:
                - acknowledged
                - indices
              examples:
                IndicesRemoveBlockResponseExample1:
                  description: A successful response from `DELETE /my-index-000001/_block/write`,
                    which removes an index block from an index.'
                  value: |-
                    {
                      "acknowledged" : true,
                      "indices" : [ {
                        "name" : "my-index-000001",
                        "unblocked" : true
                      } ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE /my-index-000001/_block/write

          '
      - lang: Python
        source: |-
          resp = client.indices.remove_block(
              index="my-index-000001",
              block="write",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.removeBlock({
            index: "my-index-000001",
            block: "write",
          });
      - lang: Ruby
        source: |-
          response = client.indices.remove_block(
            index: "my-index-000001",
            block: "write"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->removeBlock([
              "index" => "my-index-000001",
              "block" => "write",
          ]);
      - 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
              .block(IndicesBlockOptions.Write)
              .index("my-index-000001")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_analyze":
    post:
      tags:
      - indices
      summary: 'Get tokens from text analysis

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_analyze</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_analyze</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_analyze</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_analyze</span>\n
        \                     </div>\n                    \n\nThe 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.\n\n##
        Required authorization\n\n* Index privileges: `index`\n"
      externalDocs:
        url: https://www.elastic.co/docs/manage-data/data-store/text-analysis
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-analyze.html
      operationId: indices-analyze
      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-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          GET /_analyze
          {
            "analyzer": "standard",
            "text": "this is a test"
          }
      - lang: Python
        source: |-
          resp = client.indices.analyze(
              analyzer="standard",
              text="this is a test",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.analyze({
            analyzer: "standard",
            text: "this is a test",
          });
      - lang: Ruby
        source: |-
          response = client.indices.analyze(
            body: {
              "analyzer": "standard",
              "text": "this is a test"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->analyze([
              "body" => [
                  "analyzer" => "standard",
                  "text" => "this is a test",
              ],
          ]);
      - 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
              .analyzer("standard")
              .text("this is a test")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_migration/reindex/{index}/_cancel":
    post:
      tags:
      - migration
      summary: Cancel a migration reindex operation
      description: Cancel a migration reindex attempt for a data stream or index.
      operationId: indices-cancel-migrate-reindex
      parameters:
      - in: path
        name: index
        description: The index or data stream name
        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: Generally available
      x-codeSamples:
      - lang: Console
        source: 'POST /_migration/reindex/my-data-stream/_cancel

          '
      - lang: Python
        source: |-
          resp = client.perform_request(
              "POST",
              "/_migration/reindex/my-data-stream/_cancel",
          )
      - lang: JavaScript
        source: |-
          const response = await client.transport.request({
            method: "POST",
            path: "/_migration/reindex/my-data-stream/_cancel",
          });
      - lang: Ruby
        source: |-
          response = client.perform_request(
            "POST",
            "/_migration/reindex/my-data-stream/_cancel",
            {},
          )
      - lang: PHP
        source: |-
          $requestFactory = Psr17FactoryDiscovery::findRequestFactory();
          $request = $requestFactory->createRequest(
              "POST",
              "/_migration/reindex/my-data-stream/_cancel",
          );
          $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
              .index("my-data-stream")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}":
    get:
      tags:
      - indices
      summary: Get index information
      description: |
        Get information about one or more indices. For data streams, the API returns information about the
        stream’s backing indices.

        ## Required authorization

        * Index privileges: `view_index_metadata`,`manage`
      operationId: indices-get
      parameters:
      - in: path
        name: index
        description: |-
          Comma-separated list of data streams, indices, and index aliases used to limit the request.
          Wildcard expressions (*) are supported.
        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. 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
      - 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. Supports comma-separated values,
          such as open,hidden.

          Supported values include:
            - `all`: Match any data stream or index, including hidden ones.
            - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
            - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
            - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
            - `none`: Wildcard expressions are not accepted.

        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, requests that target a missing index return an error.
        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. 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

          Supported values include: `aliases`, `mappings`, `settings`

        deprecated: false
        schema:
          "$ref": "#/components/schemas/indices.get.Features"
        x-state: Generally available
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  "$ref": "#/components/schemas/indices._types.IndexState"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /my-index-000001

          '
      - lang: Python
        source: |-
          resp = client.indices.get(
              index="my-index-000001",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.get({
            index: "my-index-000001",
          });
      - lang: Ruby
        source: |-
          response = client.indices.get(
            index: "my-index-000001"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->get([
              "index" => "my-index-000001",
          ]);
      - 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
              .index("my-index-000001")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    put:
      tags:
      - indices
      summary: Create an index
      description: |
        You can use the create index API to add a new index to an Elasticsearch cluster.
        When creating an index, you can specify the following:

        * Settings for the index.
        * Mappings for fields in the index.
        * Index aliases

        **Wait for active shards**

        By 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.
        The index creation response will indicate what happened.
        For 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.
        Note that it is still possible for either `acknowledged` or `shards_acknowledged` to be `false`, but for the index creation to be successful.
        These values simply indicate whether the operation completed before the timeout.
        If `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.
        If `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`).

        You can change the default of only waiting for the primary shards to start through the index setting `index.write.wait_for_active_shards`.
        Note that changing this setting will also affect the `wait_for_active_shards` value on all subsequent write operations.

        ## Required authorization

        * Index privileges: `create_index`,`manage`
      operationId: indices-create
      parameters:
      - in: path
        name: index
        description: |-
          Name of the index you wish to create.
          Index names must meet the following criteria:

          * Lowercase only
          * Cannot include `\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, ` ` (space character), `,`, or `#`
          * Indices prior to 7.0 could contain a colon (`:`), but that has been deprecated and will not be supported in later versions
          * Cannot start with `-`, `_`, or `+`
          * Cannot be `.` or `..`
          * Cannot be longer than 255 bytes (note thtat it is bytes, so multi-byte characters will reach the limit faster)
          * Names starting with `.` are deprecated, except for hidden indices and internal indices managed by plugins
        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.
          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
      - in: query
        name: wait_for_active_shards
        description: |-
          The number of shard copies that must be active before proceeding with the operation.
          Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.WaitForActiveShards"
        style: form
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                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:
                    - Field names
                    - Field data types
                    - 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: |-
                  {
                    "settings": {
                      "number_of_shards": 3,
                      "number_of_replicas": 2
                    }
                  }
              indicesCreateRequestExample2:
                summary: Create an index with mappings.
                description: You can provide mapping definitions in the create index
                  API requests.
                value: |-
                  {
                    "settings": {
                      "number_of_shards": 1
                    },
                    "mappings": {
                      "properties": {
                        "field1": { "type": "text" }
                      }
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "aliases": {
                      "alias_1": {},
                      "alias_2": {
                        "filter": {
                          "term": {
                            "user.id": "kimchy"
                          }
                        },
                        "routing": "shard-1"
                      }
                    }
                  }
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  index:
                    allOf:
                    - "$ref": "#/components/schemas/_types.IndexName"
                  shards_acknowledged:
                    type: boolean
                  acknowledged:
                    type: boolean
                required:
                - index
                - shards_acknowledged
                - acknowledged
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT /my-index-000001
          {
            "settings": {
              "number_of_shards": 3,
              "number_of_replicas": 2
            }
          }
      - lang: Python
        source: |-
          resp = client.indices.create(
              index="my-index-000001",
              settings={
                  "number_of_shards": 3,
                  "number_of_replicas": 2
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.create({
            index: "my-index-000001",
            settings: {
              number_of_shards: 3,
              number_of_replicas: 2,
            },
          });
      - lang: Ruby
        source: |-
          response = client.indices.create(
            index: "my-index-000001",
            body: {
              "settings": {
                "number_of_shards": 3,
                "number_of_replicas": 2
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->create([
              "index" => "my-index-000001",
              "body" => [
                  "settings" => [
                      "number_of_shards" => 3,
                      "number_of_replicas" => 2,
                  ],
              ],
          ]);
      - 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
              .index("my-index-000001")
              .settings(s -> s
                  .numberOfShards("3")
                  .numberOfReplicas("2")
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - indices
      summary: Delete indices
      description: |
        Deleting an index deletes its documents, shards, and metadata.
        It does not delete related Kibana components, such as data views, visualizations, or dashboards.

        You cannot delete the current write index of a data stream.
        To delete the index, you must roll over the data stream so a new write index is created.
        You can then use the delete index API to delete the previous write index.

        ## Required authorization

        * Index privileges: `delete_index`
      operationId: indices-delete
      parameters:
      - in: path
        name: index
        description: |-
          Comma-separated list of indices to delete.
          You cannot specify index aliases.
          By default, this parameter does not support wildcards (`*`) or `_all`.
          To 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
      - 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.
        deprecated: false
        schema:
          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 whether wildcard expressions match hidden data streams.
          Supports comma-separated values, such as `open,hidden`.

          Supported values include:
            - `all`: Match any data stream or index, including hidden ones.
            - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
            - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
            - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
            - `none`: Wildcard expressions are not accepted.

        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.
          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.IndicesResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE /books

          '
      - lang: Python
        source: |-
          resp = client.indices.delete(
              index="books",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.delete({
            index: "books",
          });
      - lang: Ruby
        source: |-
          response = client.indices.delete(
            index: "books"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->delete([
              "index" => "books",
          ]);
      - lang: curl
        source: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/books"'
      - lang: Java
        source: |
          client.indices().delete(d -> d
              .index("books")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    head:
      tags:
      - indices
      summary: Check indices
      description: Check if one or more indices, index aliases, or data streams exist.
      operationId: indices-exists
      parameters:
      - 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.
          This 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.
          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`.

          Supported values include:
            - `all`: Match any data stream or index, including hidden ones.
            - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
            - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
            - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
            - `none`: Wildcard expressions are not accepted.

        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.
        deprecated: false
        schema:
          type: boolean
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json: {}
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'HEAD my-data-stream

          '
      - lang: Python
        source: |-
          resp = client.indices.exists(
              index="my-data-stream",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.exists({
            index: "my-data-stream",
          });
      - lang: Ruby
        source: |-
          response = client.indices.exists(
            index: "my-data-stream"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->exists([
              "index" => "my-data-stream",
          ]);
      - lang: curl
        source: 'curl --head -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-data-stream"'
      - lang: Java
        source: |
          client.indices().exists(e -> e
              .index("my-data-stream")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_data_stream/{name}":
    get:
      tags:
      - data stream
      summary: 'Get data streams

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_data_stream</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_data_stream/{name}</span>\n
        \                     </div>\n                    \n\nGet information about
        one or more data streams.\n\n## Required authorization\n\n* Index privileges:
        `view_index_metadata`\n"
      operationId: indices-get-data-stream
      parameters:
      - "$ref": "#/components/parameters/indices.get_data_stream-name"
      - "$ref": "#/components/parameters/indices.get_data_stream-expand_wildcards"
      - "$ref": "#/components/parameters/indices.get_data_stream-include_defaults"
      - "$ref": "#/components/parameters/indices.get_data_stream-master_timeout"
      - "$ref": "#/components/parameters/indices.get_data_stream-verbose"
      responses:
        '200':
          "$ref": "#/components/responses/indices.get_data_stream-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _data_stream/my-data-stream

          '
      - lang: Python
        source: |-
          resp = client.indices.get_data_stream(
              name="my-data-stream",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.getDataStream({
            name: "my-data-stream",
          });
      - lang: Ruby
        source: |-
          response = client.indices.get_data_stream(
            name: "my-data-stream"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->getDataStream([
              "name" => "my-data-stream",
          ]);
      - 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
              .name("my-data-stream")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    put:
      tags:
      - data stream
      summary: Create a data stream
      description: |
        You must have a matching index template with data stream enabled.

        ## Required authorization

        * Index privileges: `create_index`
      operationId: indices-create-data-stream
      parameters:
      - in: path
        name: name
        description: |-
          Name of the data stream, which must meet the following criteria:
          Lowercase only;
          Cannot include `\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, `,`, `#`, `:`, or a space character;
          Cannot start with `-`, `_`, `+`, or `.ds-`;
          Cannot be `.` or `..`;
          Cannot 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
      - 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:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'PUT _data_stream/logs-foo-bar

          '
      - lang: Python
        source: |-
          resp = client.indices.create_data_stream(
              name="logs-foo-bar",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.createDataStream({
            name: "logs-foo-bar",
          });
      - lang: Ruby
        source: |-
          response = client.indices.create_data_stream(
            name: "logs-foo-bar"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->createDataStream([
              "name" => "logs-foo-bar",
          ]);
      - 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
              .name("logs-foo-bar")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - data stream
      summary: Delete data streams
      description: |
        Deletes one or more data streams and their backing indices.

        ## Required authorization

        * Index privileges: `delete_index`
      operationId: indices-delete-data-stream
      parameters:
      - 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
      - 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: expand_wildcards
        description: |+
          Type of data stream that wildcard patterns can match. Supports comma-separated values,such as `open,hidden`.

          Supported values include:
            - `all`: Match any data stream or index, including hidden ones.
            - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
            - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
            - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
            - `none`: Wildcard expressions are not accepted.

        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.ExpandWildcards"
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _data_stream/my-data-stream

          '
      - lang: Python
        source: |-
          resp = client.indices.delete_data_stream(
              name="my-data-stream",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.deleteDataStream({
            name: "my-data-stream",
          });
      - lang: Ruby
        source: |-
          response = client.indices.delete_data_stream(
            name: "my-data-stream"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->deleteDataStream([
              "name" => "my-data-stream",
          ]);
      - 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
              .name("my-data-stream")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_create_from/{source}/{dest}":
    post:
      tags:
      - migration
      summary: 'Create an index from a source index

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/_create_from/{source}/{dest}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_create_from/{source}/{dest}</span>\n
        \                     </div>\n                    \n\nCopy 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"
      requestBody:
        "$ref": "#/components/requestBodies/indices.create_from"
      responses:
        '200':
          "$ref": "#/components/responses/indices.create_from-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'POST _create_from/my-index/my-new-index

          '
      - lang: Python
        source: |-
          resp = client.perform_request(
              "POST",
              "/_create_from/my-index/my-new-index",
          )
      - lang: JavaScript
        source: |-
          const response = await client.transport.request({
            method: "POST",
            path: "/_create_from/my-index/my-new-index",
          });
      - lang: Ruby
        source: |-
          response = client.perform_request(
            "POST",
            "/_create_from/my-index/my-new-index",
            {},
          )
      - lang: PHP
        source: |-
          $requestFactory = Psr17FactoryDiscovery::findRequestFactory();
          $request = $requestFactory->createRequest(
              "POST",
              "/_create_from/my-index/my-new-index",
          );
          $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
              .dest("my-new-index")
              .source("my-index")
              .createFrom(cr -> cr)
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_aliases/{name}":
    post:
      tags:
      - indices
      summary: 'Create or update an alias

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/{index}/_alias/{name}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_alias/{name}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/{index}/_aliases/{name}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_aliases/{name}</span>\n
        \                     </div>\n                    \n\nAdds 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/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-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST /my-index-2099.05.06-000001/_alias/my-alias
          {
            "filter": {
              "bool": {
                "filter": [
                  {
                    "range": {
                      "@timestamp": {
                        "gte": "now-1d/d",
                        "lt": "now/d"
                      }
                    }
                  },
                  {
                    "term": {
                      "user.id": "kimchy"
                    }
                  }
                ]
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.indices.put_alias(
              index="my-index-2099.05.06-000001",
              name="my-alias",
              filter={
                  "bool": {
                      "filter": [
                          {
                              "range": {
                                  "@timestamp": {
                                      "gte": "now-1d/d",
                                      "lt": "now/d"
                                  }
                              }
                          },
                          {
                              "term": {
                                  "user.id": "kimchy"
                              }
                          }
                      ]
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.putAlias({
            index: "my-index-2099.05.06-000001",
            name: "my-alias",
            filter: {
              bool: {
                filter: [
                  {
                    range: {
                      "@timestamp": {
                        gte: "now-1d/d",
                        lt: "now/d",
                      },
                    },
                  },
                  {
                    term: {
                      "user.id": "kimchy",
                    },
                  },
                ],
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.indices.put_alias(
            index: "my-index-2099.05.06-000001",
            name: "my-alias",
            body: {
              "filter": {
                "bool": {
                  "filter": [
                    {
                      "range": {
                        "@timestamp": {
                          "gte": "now-1d/d",
                          "lt": "now/d"
                        }
                      }
                    },
                    {
                      "term": {
                        "user.id": "kimchy"
                      }
                    }
                  ]
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->putAlias([
              "index" => "my-index-2099.05.06-000001",
              "name" => "my-alias",
              "body" => [
                  "filter" => [
                      "bool" => [
                          "filter" => array(
                              [
                                  "range" => [
                                      "@timestamp" => [
                                          "gte" => "now-1d/d",
                                          "lt" => "now/d",
                                      ],
                                  ],
                              ],
                              [
                                  "term" => [
                                      "user.id" => "kimchy",
                                  ],
                              ],
                          ),
                      ],
                  ],
              ],
          ]);
      - 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
              .filter(f -> f
                  .bool(b -> b
                      .filter(List.of(Query.of(q -> q
                              .range(r -> r
                                  .untyped(u -> u
                                      .field("@timestamp")
                                      .gte(JsonData.fromJson("\"now-1d/d\""))
                                      .lt(JsonData.fromJson("\"now/d\""))
                                  )
                              )
                          ),Query.of(qu -> qu
                              .term(t -> t
                                  .field("user.id")
                                  .value(FieldValue.of("kimchy"))
                              )
                          )))
                  )
              )
              .index("my-index-2099.05.06-000001")
              .name("my-alias")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - indices
      summary: 'Delete an alias

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb delete\">DELETE</span>\n                      <span
        class=\"operation-path\">/{index}/_alias/{name}</span>\n                      </div>\n
        \                   <div>\n                      <span class=\"operation-verb
        delete\">DELETE</span>\n                      <span class=\"operation-path\">/{index}/_aliases/{name}</span>\n
        \                     </div>\n                    \n\nRemoves a data stream
        or index from an alias.\n\n## Required authorization\n\n* Index privileges:
        `manage`\n"
      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-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE my-data-stream/_alias/my-alias

          '
      - lang: Python
        source: |-
          resp = client.indices.delete_alias(
              index="my-data-stream",
              name="my-alias",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.deleteAlias({
            index: "my-data-stream",
            name: "my-alias",
          });
      - lang: Ruby
        source: |-
          response = client.indices.delete_alias(
            index: "my-data-stream",
            name: "my-alias"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->deleteAlias([
              "index" => "my-data-stream",
              "name" => "my-alias",
          ]);
      - 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
              .index("my-data-stream")
              .name("my-alias")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_index_template/{name}":
    get:
      tags:
      - indices
      summary: 'Get index templates

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_index_template</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_index_template/{name}</span>\n
        \                     </div>\n                    \n\nGet information about
        one or more index templates.\n\n## Required authorization\n\n* Cluster privileges:
        `manage_index_templates`\n"
      operationId: indices-get-index-template
      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"
      - "$ref": "#/components/parameters/indices.get_index_template-master_timeout"
      - "$ref": "#/components/parameters/indices.get_index_template-include_defaults"
      responses:
        '200':
          "$ref": "#/components/responses/indices.get_index_template-200"
      x-state: Generally available
      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

          '
      - lang: Python
        source: |-
          resp = client.indices.get_index_template(
              name="*",
              filter_path="index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.getIndexTemplate({
            name: "*",
            filter_path:
              "index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream",
          });
      - lang: Ruby
        source: |-
          response = client.indices.get_index_template(
            name: "*",
            filter_path: "index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->getIndexTemplate([
              "name" => "*",
              "filter_path" => "index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream",
          ]);
      - 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
              .name("*")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    post:
      tags:
      - indices
      summary: 'Create or update an index template

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/_index_template/{name}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_index_template/{name}</span>\n
        \                     </div>\n                    \n\nIndex 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.\n\n## Required authorization\n\n* Cluster privileges: `manage_index_templates`\n"
      operationId: indices-put-index-template
      parameters:
      - "$ref": "#/components/parameters/indices.put_index_template-name"
      - "$ref": "#/components/parameters/indices.put_index_template-create"
      - "$ref": "#/components/parameters/indices.put_index_template-master_timeout"
      - "$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: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT /_index_template/template_1
          {
            "index_patterns" : ["template*"],
            "priority" : 1,
            "template": {
              "settings" : {
                "number_of_shards" : 2
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.indices.put_index_template(
              name="template_1",
              index_patterns=[
                  "template*"
              ],
              priority=1,
              template={
                  "settings": {
                      "number_of_shards": 2
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.putIndexTemplate({
            name: "template_1",
            index_patterns: ["template*"],
            priority: 1,
            template: {
              settings: {
                number_of_shards: 2,
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.indices.put_index_template(
            name: "template_1",
            body: {
              "index_patterns": [
                "template*"
              ],
              "priority": 1,
              "template": {
                "settings": {
                  "number_of_shards": 2
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->putIndexTemplate([
              "name" => "template_1",
              "body" => [
                  "index_patterns" => array(
                      "template*",
                  ),
                  "priority" => 1,
                  "template" => [
                      "settings" => [
                          "number_of_shards" => 2,
                      ],
                  ],
              ],
          ]);
      - 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
              .indexPatterns("template*")
              .name("template_1")
              .priority(1L)
              .template(t -> t
                  .settings(s -> s
                      .numberOfShards("2")
                  )
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - indices
      summary: Delete an index template
      description: |
        The provided <index-template> may contain multiple template names separated by a comma. If multiple template
        names are specified then there is no wildcard support and the provided names should match completely with
        existing templates.

        ## Required authorization

        * Cluster privileges: `manage_index_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
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Names"
        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:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE /_index_template/my-index-template

          '
      - lang: Python
        source: |-
          resp = client.indices.delete_index_template(
              name="my-index-template",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.deleteIndexTemplate({
            name: "my-index-template",
          });
      - lang: Ruby
        source: |-
          response = client.indices.delete_index_template(
            name: "my-index-template"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->deleteIndexTemplate([
              "name" => "my-index-template",
          ]);
      - 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
              .name("my-index-template")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    head:
      tags:
      - indices
      summary: Check index templates
      description: |
        Check whether index templates exist.

        ## Required authorization

        * Cluster privileges: `manage_index_templates`
      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
        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: 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: {}
      x-state: Generally available
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_alias/{name}":
    get:
      tags:
      - indices
      summary: 'Get aliases

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_alias</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_alias/{name}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_alias</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_alias/{name}</span>\n
        \                     </div>\n                    \n\nRetrieves information
        for one or more data stream or index aliases.\n\n## Required authorization\n\n*
        Index privileges: `view_index_metadata`\n"
      operationId: indices-get-alias
      parameters:
      - "$ref": "#/components/parameters/indices.get_alias-index"
      - "$ref": "#/components/parameters/indices.get_alias-name"
      - "$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"
      - "$ref": "#/components/parameters/indices.get_alias-master_timeout"
      responses:
        '200':
          "$ref": "#/components/responses/indices.get_alias-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _alias

          '
      - 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);

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    head:
      tags:
      - indices
      summary: 'Check aliases

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb head\">HEAD</span>\n                      <span class=\"operation-path\">/_alias/{name}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb head\">HEAD</span>\n                      <span class=\"operation-path\">/{index}/_alias/{name}</span>\n
        \                     </div>\n                    \n\nCheck if one or more
        data stream or index aliases exist."
      operationId: indices-exists-alias
      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-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'HEAD _alias/my-alias

          '
      - lang: Python
        source: |-
          resp = client.indices.exists_alias(
              name="my-alias",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.existsAlias({
            name: "my-alias",
          });
      - lang: Ruby
        source: |-
          response = client.indices.exists_alias(
            name: "my-alias"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->existsAlias([
              "name" => "my-alias",
          ]);
      - lang: curl
        source: 'curl --head -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_alias/my-alias"'
      - lang: Java
        source: |
          client.indices().existsAlias(e -> e
              .name("my-alias")
          );
      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.18/data-streams-explain-lifecycle.html
      operationId: indices-explain-data-lifecycle
      parameters:
      - in: path
        name: index
        description: Comma-separated list of index names to explain
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Indices"
        style: simple
      - in: query
        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
        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:
        '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.

                    '
                  value: |-
                    {
                      "indices": {
                        ".ds-metrics-2023.03.22-000001": {
                          "index" : ".ds-metrics-2023.03.22-000001",
                          "managed_by_lifecycle" : true,
                          "index_creation_date_millis" : 1679475563571,
                          "time_since_index_creation" : "843ms",
                          "rollover_date_millis" : 1679475564293,
                          "time_since_rollover" : "121ms",
                          "lifecycle" : { },
                          "generation_time" : "121ms"
                      }
                    }
                IndicesExplainDataLifecycleResponseExample2:
                  summary: Successful response with error messages
                  description: The API reports any errors related to the lifecycle
                    execution for the target index.
                  value: |-
                    {
                      "indices": {
                        ".ds-metrics-2023.03.22-000001": {
                          "index" : ".ds-metrics-2023.03.22-000001",
                          "managed_by_lifecycle" : true,
                          "index_creation_date_millis" : 1679475563571,
                          "time_since_index_creation" : "843ms",
                          "lifecycle" : {
                            "enabled": true
                          },
                          "error": "{\"type\":\"validation_exception\",\"reason\":\"Validation Failed: 1: this action would add [2] shards, but this cluster
                    currently has [4]/[3] maximum normal shards open;\"}"
                      }
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET .ds-metrics-2023.03.22-000001/_lifecycle/explain

          '
      - lang: Python
        source: |-
          resp = client.indices.explain_data_lifecycle(
              index=".ds-metrics-2023.03.22-000001",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.explainDataLifecycle({
            index: ".ds-metrics-2023.03.22-000001",
          });
      - lang: Ruby
        source: |-
          response = client.indices.explain_data_lifecycle(
            index: ".ds-metrics-2023.03.22-000001"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->explainDataLifecycle([
              "index" => ".ds-metrics-2023.03.22-000001",
          ]);
      - 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
              .index(".ds-metrics-2023.03.22-000001")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_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.
      externalDocs:
        url: https://www.elastic.co/docs/manage-data/lifecycle/data-stream
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/data-streams-get-lifecycle.html
      operationId: indices-get-data-lifecycle
      parameters:
      - in: path
        name: name
        description: |-
          Comma-separated list of data streams to limit the request.
          Supports wildcards (`*`).
          To target all data streams, omit this parameter or use `*` or `_all`.
        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.
          Supports comma-separated values, such as `open,hidden`.

          Supported values include:
            - `all`: Match any data stream or index, including hidden ones.
            - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
            - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
            - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
            - `none`: Wildcard expressions are not accepted.

        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.ExpandWildcards"
        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: 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:
                  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: |-
                    {
                      "data_streams": [
                        {
                          "name": "my-data-stream-1",
                          "lifecycle": {
                            "enabled": true,
                            "data_retention": "7d"
                          }
                        },
                        {
                          "name": "my-data-stream-2",
                          "lifecycle": {
                            "enabled": true,
                            "data_retention": "7d"
                          }
                        }
                      ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_data_stream/{name}/_lifecycle?human&pretty

          '
      - lang: Python
        source: |-
          resp = client.indices.get_data_lifecycle(
              name="{name}",
              human=True,
              pretty=True,
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.getDataLifecycle({
            name: "{name}",
            human: "true",
            pretty: "true",
          });
      - lang: Ruby
        source: |-
          response = client.indices.get_data_lifecycle(
            name: "{name}",
            human: "true",
            pretty: "true"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->getDataLifecycle([
              "name" => "{name}",
              "human" => "true",
              "pretty" => "true",
          ]);
      - 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
              .name("{name}")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    put:
      tags:
      - data stream
      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.18/data-streams-put-lifecycle.html
      operationId: indices-put-data-lifecycle
      parameters:
      - in: path
        name: name
        description: |-
          Comma-separated list of data streams used to limit the request.
          Supports wildcards (`*`).
          To target all data streams use `*` or `_all`.
        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.
          Supports comma-separated values, such as `open,hidden`.

          Supported values include:
            - `all`: Match any data stream or index, including hidden ones.
            - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
            - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
            - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
            - `none`: Wildcard expressions are not accepted.

        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.ExpandWildcards"
        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: 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:
                data_retention:
                  description: |-
                    If defined, every document added to this data stream will be stored at least for this time frame.
                    Any time after this duration the document could be deleted.
                    When empty, every document in this data stream will be stored indefinitely.
                  allOf:
                  - "$ref": "#/components/schemas/_types.Duration"
                downsampling:
                  description: The downsampling configuration to execute for the managed
                    backing index after rollover.
                  type: array
                  items:
                    "$ref": "#/components/schemas/indices._types.DownsamplingRound"
                downsampling_method:
                  description: |-
                    The method used to downsample the data. There are two options `aggregate` and `last_value`. It requires
                    `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
                    that'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: |-
                  {
                    "data_retention": "7d"
                  }
              IndicesPutDataLifecycleRequestExample2:
                summary: Set the data stream lifecycle downsampling
                description: This example configures two downsampling rounds.
                value: |-
                  {
                      "downsampling": [
                        {
                          "after": "1d",
                          "fixed_interval": "10m"
                        },
                        {
                          "after": "7d",
                          "fixed_interval": "1d"
                        }
                      ]
                  }
        required: true
      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: |-
                    {
                      "acknowledged": true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _data_stream/my-data-stream/_lifecycle
          {
            "data_retention": "7d"
          }
      - lang: Python
        source: |-
          resp = client.indices.put_data_lifecycle(
              name="my-data-stream",
              data_retention="7d",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.putDataLifecycle({
            name: "my-data-stream",
            data_retention: "7d",
          });
      - lang: Ruby
        source: |-
          response = client.indices.put_data_lifecycle(
            name: "my-data-stream",
            body: {
              "data_retention": "7d"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->putDataLifecycle([
              "name" => "my-data-stream",
              "body" => [
                  "data_retention" => "7d",
              ],
          ]);
      - 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
              .dataRetention(d -> d
                  .time("7d")
              )
              .name("my-data-stream")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_data_stream/{name}/_mappings":
    get:
      tags:
      - data stream
      summary: Get data stream mappings
      description: |
        Get mapping information for one or more data streams.

        ## Required authorization

        * Index privileges: `view_index_metadata`
      operationId: indices-get-data-stream-mappings
      parameters:
      - 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
      - in: query
        name: master_timeout
        description: |-
          The 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:
                  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.

                    '
                  value: |-
                    {
                      "data_streams": [
                        {
                          "name": "my-data-stream",
                          "mappings": {
                            "properties": {
                              "field1": {
                                "type": "ip"
                              },
                              "field3": {
                                "type": "text"
                              }
                            }
                          },
                          "effective_mappings": {
                            "properties": {
                              "field1": {
                                "type": "ip"
                              },
                              "field2": {
                                "type": "text"
                              },
                              "field3": {
                                "type": "text"
                              }
                            }
                          }
                        }
                      ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_data_stream/my-data-stream/_mappings

          '
      - lang: Python
        source: |-
          resp = client.indices.get_data_stream_mappings(
              name="my-data-stream",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.getDataStreamMappings({
            name: "my-data-stream",
          });
      - lang: Ruby
        source: |-
          response = client.indices.get_data_stream_mappings(
            name: "my-data-stream"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->getDataStreamMappings([
              "name" => "my-data-stream",
          ]);
      - 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
              .name("my-data-stream")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    put:
      tags:
      - data stream
      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
        is specified in the template that the data stream matches. The mapping change is only applied to new write indices
        that are created during rollover after this API is called. No indices are changed by this API.

        ## Required authorization

        * Index privileges: `manage`
      operationId: indices-put-data-stream-mappings
      parameters:
      - 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
          simulates changing the settings and reports back to the user what would have happened had these settings
          actually been applied.
        deprecated: false
        schema:
          type: boolean
        style: form
      - in: query
        name: master_timeout
        description: |-
          The 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: |-
          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:
              "$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.

                  '
                value: |-
                  {
                     "properties":{
                        "field1":{
                           "type":"ip"
                        },
                        "field3":{
                           "type":"text"
                        }
                     }
                  }
        required: true
      responses:
        '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.

                    '
                  value: |-
                    {
                      "data_streams": [
                        {
                          "name": "my-data-stream",
                          "applied_to_data_stream": true,
                          "mappings": {
                            "properties": {
                              "field1": {
                                "type": "ip"
                              },
                              "field3": {
                                "type": "text"
                              }
                            }
                          },
                          "effective_mappings": {
                            "properties": {
                              "field1": {
                                "type": "ip"
                              },
                              "field3": {
                                "type": "text"
                              }
                            }
                          }
                        }
                      ]
                    }
                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.

                    '
                  value: |-
                    {
                      "data_streams": [
                        {
                          "name": "my-data-stream",
                          "applied_to_data_stream": false,
                          "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.",
                          "mappings": {
                            "_doc": {}
                          },
                          "effective_mappings": {
                            "_doc": {}
                          }
                        }
                      ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT /_data_stream/my-data-stream/_mappings
          {
             "properties":{
                "field1":{
                   "type":"ip"
                },
                "field3":{
                   "type":"text"
                }
             }
          }
      - lang: Python
        source: |-
          resp = client.indices.put_data_stream_mappings(
              name="my-data-stream",
              mappings={
                  "properties": {
                      "field1": {
                          "type": "ip"
                      },
                      "field3": {
                          "type": "text"
                      }
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.putDataStreamMappings({
            name: "my-data-stream",
            mappings: {
              properties: {
                field1: {
                  type: "ip",
                },
                field3: {
                  type: "text",
                },
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.indices.put_data_stream_mappings(
            name: "my-data-stream",
            body: {
              "properties": {
                "field1": {
                  "type": "ip"
                },
                "field3": {
                  "type": "text"
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->putDataStreamMappings([
              "name" => "my-data-stream",
              "body" => [
                  "properties" => [
                      "field1" => [
                          "type" => "ip",
                      ],
                      "field3" => [
                          "type" => "text",
                      ],
                  ],
              ],
          ]);
      - 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
              .name("my-data-stream")
              .mappings(m -> m
                  .properties(Map.of("field1", Property.of(pr -> pr
                          .ip(i -> i)
                      ),"field3", Property.of(pro -> pro
                          .text(t -> t)
                      )))
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_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.
          Supports wildcards (`*`).
          To target all data streams, omit this parameter or use `*` or `_all`.
        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.
          Supports comma-separated values, such as `open,hidden`.

          Supported values include:
            - `all`: Match any data stream or index, including hidden ones.
            - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
            - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
            - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
            - `none`: Wildcard expressions are not accepted.

        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.ExpandWildcards"
        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:
                  data_streams:
                    type: array
                    items:
                      "$ref": "#/components/schemas/indices.get_data_stream_options.DataStreamWithOptions"
                required:
                - data_streams
      x-state: Generally available
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    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.
          Supports wildcards (`*`).
          To target all data streams use `*` or `_all`.
        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.
          Supports comma-separated values, such as `open,hidden`.

          Supported values include:
            - `all`: Match any data stream or index, including hidden ones.
            - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
            - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
            - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
            - `none`: Wildcard expressions are not accepted.

        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.ExpandWildcards"
        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: 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:
                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':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      x-state: Generally available
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_data_stream/{name}/_settings":
    get:
      tags:
      - data stream
      summary: Get data stream settings
      description: |
        Get setting information for one or more data streams.

        ## Required authorization

        * Index privileges: `view_index_metadata`
      operationId: indices-get-data-stream-settings
      parameters:
      - 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
      - in: query
        name: master_timeout
        description: |-
          The 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:
                  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.

                    '
                  value: |-
                    {
                      "data_streams": [
                        {
                          "name": "my-data-stream",
                          "settings": {
                            "index": {
                              "lifecycle": {
                                "name": "new-test-policy"
                              },
                              "number_of_shards": "11"
                            }
                          },
                          "effective_settings": {
                            "index": {
                              "lifecycle": {
                                "name": "new-test-policy"
                              },
                              "mode": "standard",
                              "number_of_shards": "11",
                              "number_of_replicas": "0"
                            }
                          }
                        }
                      ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_data_stream/my-data-stream/_settings

          '
      - lang: Python
        source: |-
          resp = client.indices.get_data_stream_settings(
              name="my-data-stream",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.getDataStreamSettings({
            name: "my-data-stream",
          });
      - lang: Ruby
        source: |-
          response = client.indices.get_data_stream_settings(
            name: "my-data-stream"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->getDataStreamSettings([
              "name" => "my-data-stream",
          ]);
      - 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
              .name("my-data-stream")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    put:
      tags:
      - data stream
      summary: Update data stream settings
      description: |
        NOTE: Available in 8.19. Not available in earlier versions.

        This API can be used to override settings on specific data streams. These overrides will take precedence over what
        is specified in the template that the data stream matches. To prevent your data stream from getting into an invalid state,
        only certain settings are allowed. If possible, the setting change is applied to all
        backing indices. Otherwise, it will be applied when the data stream is next rolled over.

        ## Required authorization

        * Index privileges: `manage`
      operationId: indices-put-data-stream-settings
      parameters:
      - 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 settings on any data streams or indices. Instead, it
          simulates changing the settings and reports back to the user what would have happened had these settings
          actually been applied.
        deprecated: false
        schema:
          type: boolean
        style: form
      - in: query
        name: master_timeout
        description: |-
          The 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: |-
          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:
              "$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.

                  '
                value: |-
                  {
                    "index.lifecycle.name" : "new-test-policy",
                    "index.number_of_shards": 11
                  }
        required: true
      responses:
        '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.

                    '
                  value: |-
                    {
                      "data_streams": [
                        {
                          "name": "my-data-stream",
                          "applied_to_data_stream": true,
                          "settings": {
                            "index": {
                              "lifecycle": {
                                "name": "new-test-policy"
                              },
                              "number_of_shards": "11"
                            }
                          },
                          "effective_settings": {
                            "index": {
                              "lifecycle": {
                                "name": "new-test-policy"
                              },
                              "mode": "standard",
                              "number_of_shards": "11",
                              "number_of_replicas": "0"
                            }
                          },
                          "index_settings_results": {
                            "applied_to_data_stream_only": [
                              "index.number_of_shards"
                            ],
                            "applied_to_data_stream_and_backing_indices": [
                              "index.lifecycle.name"
                            ]
                          }
                        }
                      ]
                    }
                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.

                    '
                  value: |-
                    {
                      "data_streams": [
                        {
                          "name": "my-data-stream",
                          "applied_to_data_stream": true,
                          "settings": {
                            "index": {
                              "lifecycle": {
                                "name": "new-test-policy"
                              },
                              "number_of_shards": "11"
                            }
                          },
                          "effective_settings": {
                            "index": {
                              "lifecycle": {
                                "name": "new-test-policy"
                              },
                              "mode": "standard",
                              "number_of_shards": "11",
                              "number_of_replicas": "0"
                            }
                          },
                          "index_settings_results": {
                            "applied_to_data_stream_only": [
                              "index.number_of_shards"
                            ],
                            "applied_to_data_stream_and_backing_indices": [
                              "index.lifecycle.name"
                            ],
                            "errors": [
                              {
                                "index": ".ds-my-data-stream-2025.05.28-000001",
                                "error": "index [.ds-my-data-stream-2025.05.28-000001] blocked by: [FORBIDDEN/9/index metadata (api)];"
                              }
                            ]
                          }
                        }
                      ]
                    }
                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.

                    '
                  value: |-
                    {
                      "data_streams": [
                        {
                          "name": "my-data-stream",
                          "applied_to_data_stream": false,
                          "error": "Cannot set the following settings on a data stream: [index.number_of_replicas]",
                          "settings": {},
                          "effective_settings": {},
                          "index_settings_results": {
                            "applied_to_data_stream_only": [],
                            "applied_to_data_stream_and_backing_indices": []
                          }
                        }
                      ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT /_data_stream/my-data-stream/_settings
          {
            "index.lifecycle.name" : "new-test-policy",
            "index.number_of_shards": 11
          }
      - lang: Python
        source: |-
          resp = client.indices.put_data_stream_settings(
              name="my-data-stream",
              settings={
                  "index.lifecycle.name": "new-test-policy",
                  "index.number_of_shards": 11
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.putDataStreamSettings({
            name: "my-data-stream",
            settings: {
              "index.lifecycle.name": "new-test-policy",
              "index.number_of_shards": 11,
            },
          });
      - lang: Ruby
        source: |-
          response = client.indices.put_data_stream_settings(
            name: "my-data-stream",
            body: {
              "index.lifecycle.name": "new-test-policy",
              "index.number_of_shards": 11
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->putDataStreamSettings([
              "name" => "my-data-stream",
              "body" => [
                  "index.lifecycle.name" => "new-test-policy",
                  "index.number_of_shards" => 11,
              ],
          ]);
      - 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
              .name("my-data-stream")
              .settings(s -> s
                  .otherSettings(Map.of("index.lifecycle.name", JsonData.fromJson("\"new-test-policy\""),"index.number_of_shards", JsonData.fromJson("11")))
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_mapping":
    get:
      tags:
      - indices
      summary: 'Get mapping definitions

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_mapping</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_mapping</span>\n
        \                     </div>\n                    \n\nFor data streams, the
        API retrieves mappings for the stream’s backing indices.\n\n## Required authorization\n\n*
        Index privileges: `view_index_metadata`\n"
      operationId: indices-get-mapping
      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"
      - "$ref": "#/components/parameters/indices.get_mapping-master_timeout"
      responses:
        '200':
          "$ref": "#/components/responses/indices.get_mapping-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /books/_mapping

          '
      - lang: Python
        source: |-
          resp = client.indices.get_mapping(
              index="books",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.getMapping({
            index: "books",
          });
      - lang: Ruby
        source: |-
          response = client.indices.get_mapping(
            index: "books"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->getMapping([
              "index" => "books",
          ]);
      - lang: curl
        source: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/books/_mapping"'
      - lang: Java
        source: |
          client.indices().getMapping(g -> g
              .index("books")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    post:
      tags:
      - indices
      summary: 'Update field mappings

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/{index}/_mapping</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_mapping</span>\n
        \                     </div>\n                    \n\nAdd 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.\n\n## Required authorization\n\n* Index privileges: `manage`\n"
      externalDocs:
        url: https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/mapping-parameters
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-put-mapping.html
      operationId: indices-put-mapping
      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"
      requestBody:
        "$ref": "#/components/requestBodies/indices.put_mapping"
      responses:
        '200':
          "$ref": "#/components/responses/indices.put_mapping-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT /my-index-000001/_mapping
          {
            "properties": {
              "user": {
                "properties": {
                  "name": {
                    "type": "keyword"
                  }
                }
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.indices.put_mapping(
              index="my-index-000001",
              properties={
                  "user": {
                      "properties": {
                          "name": {
                              "type": "keyword"
                          }
                      }
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.putMapping({
            index: "my-index-000001",
            properties: {
              user: {
                properties: {
                  name: {
                    type: "keyword",
                  },
                },
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.indices.put_mapping(
            index: "my-index-000001",
            body: {
              "properties": {
                "user": {
                  "properties": {
                    "name": {
                      "type": "keyword"
                    }
                  }
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->putMapping([
              "index" => "my-index-000001",
              "body" => [
                  "properties" => [
                      "user" => [
                          "properties" => [
                              "name" => [
                                  "type" => "keyword",
                              ],
                          ],
                      ],
                  ],
              ],
          ]);
      - 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
              .index("my-index-000001")
              .properties("user", pr -> pr
                  .object(o -> o
                      .properties("name", pro -> pro
                          .keyword(k -> k)
                      )
                  )
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_migration/reindex/{index}/_status":
    get:
      tags:
      - migration
      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: path
        name: index
        description: The index or data stream name.
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Indices"
        style: simple
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  start_time:
                    allOf:
                    - "$ref": "#/components/schemas/_types.DateTime"
                  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:
                - start_time_millis
                - complete
                - total_indices_in_data_stream
                - total_indices_requiring_upgrade
                - successes
                - in_progress
                - pending
                - errors
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_migration/reindex/my-data-stream/_status

          '
      - lang: Python
        source: |-
          resp = client.perform_request(
              "GET",
              "/_migration/reindex/my-data-stream/_status",
          )
      - lang: JavaScript
        source: |-
          const response = await client.transport.request({
            method: "GET",
            path: "/_migration/reindex/my-data-stream/_status",
          });
      - lang: Ruby
        source: |-
          response = client.perform_request(
            "GET",
            "/_migration/reindex/my-data-stream/_status",
            {},
          )
      - lang: PHP
        source: |-
          $requestFactory = Psr17FactoryDiscovery::findRequestFactory();
          $request = $requestFactory->createRequest(
              "GET",
              "/_migration/reindex/my-data-stream/_status",
          );
          $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
              .index("my-data-stream")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_settings/{name}":
    get:
      tags:
      - indices
      summary: 'Get index settings

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_settings</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_settings/{name}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_settings</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_settings/{name}</span>\n
        \                     </div>\n                    \n\nGet setting information
        for one or more indices.\nFor data streams, it returns setting information
        for the stream's backing indices.\n\n## Required authorization\n\n* Index
        privileges: `view_index_metadata`\n"
      operationId: indices-get-settings
      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"
      - "$ref": "#/components/parameters/indices.get_settings-master_timeout"
      responses:
        '200':
          "$ref": "#/components/responses/indices.get_settings-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _all/_settings?expand_wildcards=all&filter_path=*.settings.index.*.slowlog

          '
      - lang: Python
        source: |-
          resp = client.indices.get_settings(
              index="_all",
              expand_wildcards="all",
              filter_path="*.settings.index.*.slowlog",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.getSettings({
            index: "_all",
            expand_wildcards: "all",
            filter_path: "*.settings.index.*.slowlog",
          });
      - lang: Ruby
        source: |-
          response = client.indices.get_settings(
            index: "_all",
            expand_wildcards: "all",
            filter_path: "*.settings.index.*.slowlog"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->getSettings([
              "index" => "_all",
              "expand_wildcards" => "all",
              "filter_path" => "*.settings.index.*.slowlog",
          ]);
      - 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
              .expandWildcards("all")
              .index("_all")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_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.
        You must have a matching index template that is data stream enabled.
        The alias must meet the following criteria:
        The alias must have a write index;
        All indices for the alias must have a `@timestamp` field mapping of a `date` or `date_nanos` field type;
        The alias must not have any filters;
        The alias must not use custom routing.
        If successful, the request removes the alias and creates a data stream with the same name.
        The indices for the alias become hidden backing indices for the stream.
        The write index for the alias becomes the write index for the stream.

        ## Required authorization

        * Index privileges: `manage`
      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
        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. 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
      x-codeSamples:
      - lang: Console
        source: 'POST _data_stream/_migrate/my-time-series-data

          '
      - lang: Python
        source: |-
          resp = client.indices.migrate_to_data_stream(
              name="my-time-series-data",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.migrateToDataStream({
            name: "my-time-series-data",
          });
      - lang: Ruby
        source: |-
          response = client.indices.migrate_to_data_stream(
            name: "my-time-series-data"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->migrateToDataStream([
              "name" => "my-time-series-data",
          ]);
      - 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
              .name("my-time-series-data")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_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"
              required:
              - actions
            examples:
              IndicesModifyDataStreamExample1:
                description: An example body for a `POST _data_stream/_modify` request.
                value: |-
                  {
                    "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"
                        }
                      }
                    ]
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _data_stream/_modify
          {
            "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"
                }
              }
            ]
          }
      - lang: Python
        source: |-
          resp = client.indices.modify_data_stream(
              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"
                      }
                  }
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.modifyDataStream({
            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",
                },
              },
            ],
          });
      - lang: Ruby
        source: |-
          response = client.indices.modify_data_stream(
            body: {
              "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"
                  }
                }
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->modifyDataStream([
              "body" => [
                  "actions" => array(
                      [
                          "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",
                          ],
                      ],
                  ),
              ],
          ]);
      - 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
              .actions(List.of(Action.of(a -> a
                      .removeBackingIndex(r -> r
                          .dataStream("my-data-stream")
                          .index(".ds-my-data-stream-2023.07.26-000001")
                      )
                  ),Action.of(ac -> ac
                      .addBackingIndex(ad -> ad
                          .dataStream("my-data-stream")
                          .index(".ds-my-data-stream-2023.07.26-000001-downsample")
                      )
                  )))
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_settings":
    put:
      tags:
      - indices
      summary: 'Update index settings

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/_settings</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/{index}/_settings</span>\n
        \                     </div>\n                    \n\nChanges 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.\n\n## Required authorization\n\n* Index privileges:
        `manage`\n"
      externalDocs:
        url: https://www.elastic.co/docs/reference/elasticsearch/index-settings/
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/indices-update-settings.html
      operationId: indices-put-settings
      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"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT /my-index-000001/_settings
          {
            "index" : {
              "number_of_replicas" : 2
            }
          }
      - lang: Python
        source: |-
          resp = client.indices.put_settings(
              index="my-index-000001",
              settings={
                  "index": {
                      "number_of_replicas": 2
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.putSettings({
            index: "my-index-000001",
            settings: {
              index: {
                number_of_replicas: 2,
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.indices.put_settings(
            index: "my-index-000001",
            body: {
              "index": {
                "number_of_replicas": 2
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->putSettings([
              "index" => "my-index-000001",
              "body" => [
                  "index" => [
                      "number_of_replicas" => 2,
                  ],
              ],
          ]);
      - 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
              .index("my-index-000001")
              .settings(s -> s
                  .index(i -> i
                      .numberOfReplicas("2")
                  )
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_refresh":
    get:
      tags:
      - indices
      summary: 'Refresh an index

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_refresh</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_refresh</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_refresh</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_refresh</span>\n
        \                     </div>\n                    \n\nA 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.\n\n## Required authorization\n\n*
        Index privileges: `maintenance`\n"
      operationId: indices-refresh
      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"
      responses:
        '200':
          "$ref": "#/components/responses/indices.refresh-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _refresh

          '
      - 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);

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_resolve/index/{name}":
    post:
      tags:
      - indices
      summary: 'Resolve indices

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_resolve/index/{name}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_resolve/index/{name}</span>\n
        \                     </div>\n                    \n\nResolve the names and/or
        index patterns for indices, aliases, and data streams.\nMultiple patterns
        and remote clusters are supported.\n\n## Required authorization\n\n* Index
        privileges: `view_index_metadata`\n"
      operationId: indices-resolve-index
      parameters:
      - "$ref": "#/components/parameters/indices.resolve_index-name"
      - "$ref": "#/components/parameters/indices.resolve_index-expand_wildcards"
      - "$ref": "#/components/parameters/indices.resolve_index-ignore_unavailable"
      - "$ref": "#/components/parameters/indices.resolve_index-allow_no_indices"
      - "$ref": "#/components/parameters/indices.resolve_index-mode"
      requestBody:
        "$ref": "#/components/requestBodies/indices.resolve_index"
      responses:
        '200':
          "$ref": "#/components/responses/indices.resolve_index-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_resolve/index/f*,remoteCluster1:bar*?expand_wildcards=all

          '
      - lang: Python
        source: |-
          resp = client.indices.resolve_index(
              name="f*,remoteCluster1:bar*",
              expand_wildcards="all",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.resolveIndex({
            name: "f*,remoteCluster1:bar*",
            expand_wildcards: "all",
          });
      - lang: Ruby
        source: |-
          response = client.indices.resolve_index(
            name: "f*,remoteCluster1:bar*",
            expand_wildcards: "all"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->resolveIndex([
              "name" => "f*,remoteCluster1:bar*",
              "expand_wildcards" => "all",
          ]);
      - 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
              .expandWildcards("all")
              .name(List.of("f*","remoteCluster1:bar*"))
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{alias}/_rollover/{new_index}":
    post:
      tags:
      - indices
      summary: 'Roll over to a new index

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{alias}/_rollover</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{alias}/_rollover/{new_index}</span>\n
        \                     </div>\n                    \n\nTIP: 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
        `<my-index-{now/d}-000001>`.\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`.\n\n##
        Required authorization\n\n* Index privileges: `manage`\n"
      operationId: indices-rollover
      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"
      requestBody:
        "$ref": "#/components/requestBodies/indices.rollover"
      responses:
        '200':
          "$ref": "#/components/responses/indices.rollover-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST my-data-stream/_rollover
          {
            "conditions": {
              "max_age": "7d",
              "max_docs": 1000,
              "max_primary_shard_size": "50gb",
              "max_primary_shard_docs": "2000"
            }
          }
      - lang: Python
        source: |-
          resp = client.indices.rollover(
              alias="my-data-stream",
              conditions={
                  "max_age": "7d",
                  "max_docs": 1000,
                  "max_primary_shard_size": "50gb",
                  "max_primary_shard_docs": "2000"
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.rollover({
            alias: "my-data-stream",
            conditions: {
              max_age: "7d",
              max_docs: 1000,
              max_primary_shard_size: "50gb",
              max_primary_shard_docs: "2000",
            },
          });
      - lang: Ruby
        source: |-
          response = client.indices.rollover(
            alias: "my-data-stream",
            body: {
              "conditions": {
                "max_age": "7d",
                "max_docs": 1000,
                "max_primary_shard_size": "50gb",
                "max_primary_shard_docs": "2000"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->rollover([
              "alias" => "my-data-stream",
              "body" => [
                  "conditions" => [
                      "max_age" => "7d",
                      "max_docs" => 1000,
                      "max_primary_shard_size" => "50gb",
                      "max_primary_shard_docs" => "2000",
                  ],
              ],
          ]);
      - 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
              .alias("my-data-stream")
              .conditions(c -> c
                  .maxAge(m -> m
                      .time("7d")
                  )
                  .maxDocs(1000L)
                  .maxPrimaryShardSize("50gb")
                  .maxPrimaryShardDocs(2000L)
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_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.

        ## Required authorization

        * Cluster privileges: `manage_index_templates`
      operationId: indices-simulate-index-template
      parameters:
      - in: path
        name: name
        description: Name of the index to simulate
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Name"
        style: simple
      - 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
      - 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
      - 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: include_defaults
        description: If true, returns all relevant default configurations for the
          index template.
        deprecated: false
        schema:
          type: boolean
        x-state: Generally available
        style: form
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/indices._types.IndexTemplate"
      responses:
        '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: |-
                    {
                      "template" : {
                        "settings" : {
                          "index" : {
                            "number_of_shards" : "2",
                            "number_of_replicas" : "0",
                            "routing" : {
                              "allocation" : {
                                "include" : {
                                  "_tier_preference" : "data_content"
                                }
                              }
                            }
                          }
                        },
                        "mappings" : {
                          "properties" : {
                            "@timestamp" : {
                              "type" : "date"
                            }
                          }
                        },
                        "aliases" : { }
                      },
                      "overlapping" : [
                        {
                          "name" : "template_1",
                          "index_patterns" : [
                            "my-index-*"
                          ]
                        }
                      ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'POST /_index_template/_simulate_index/my-index-000001

          '
      - lang: Python
        source: |-
          resp = client.indices.simulate_index_template(
              name="my-index-000001",
              index_template=None,
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.simulateIndexTemplate({
            name: "my-index-000001",
            index_template: null,
          });
      - lang: Ruby
        source: |-
          response = client.indices.simulate_index_template(
            name: "my-index-000001"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->simulateIndexTemplate([
              "name" => "my-index-000001",
          ]);
      - 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
              .name("my-index-000001")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_index_template/_simulate/{name}":
    post:
      tags:
      - indices
      summary: 'Simulate an index template

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_index_template/_simulate</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_index_template/_simulate/{name}</span>\n
        \                     </div>\n                    \n\nGet the index configuration
        that would be applied by a particular index template.\n\n## Required authorization\n\n*
        Cluster privileges: `manage_index_templates`\n"
      operationId: indices-simulate-template
      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-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST /_index_template/_simulate
          {
            "index_patterns": ["my-index-*"],
            "composed_of": ["ct2"],
            "priority": 10,
            "template": {
              "settings": {
                "index.number_of_replicas": 1
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.indices.simulate_template(
              index_patterns=[
                  "my-index-*"
              ],
              composed_of=[
                  "ct2"
              ],
              priority=10,
              template={
                  "settings": {
                      "index.number_of_replicas": 1
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.simulateTemplate({
            index_patterns: ["my-index-*"],
            composed_of: ["ct2"],
            priority: 10,
            template: {
              settings: {
                "index.number_of_replicas": 1,
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.indices.simulate_template(
            body: {
              "index_patterns": [
                "my-index-*"
              ],
              "composed_of": [
                "ct2"
              ],
              "priority": 10,
              "template": {
                "settings": {
                  "index.number_of_replicas": 1
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->simulateTemplate([
              "body" => [
                  "index_patterns" => array(
                      "my-index-*",
                  ),
                  "composed_of" => array(
                      "ct2",
                  ),
                  "priority" => 10,
                  "template" => [
                      "settings" => [
                          "index.number_of_replicas" => 1,
                      ],
                  ],
              ],
          ]);
      - 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
              .composedOf("ct2")
              .indexPatterns("my-index-*")
              .priority(10L)
              .template(t -> t
                  .settings(se -> se
                      .otherSettings("index.number_of_replicas", JsonData.fromJson("1"))
                  )
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_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.
          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:
                actions:
                  description: Actions to perform.
                  type: array
                  items:
                    "$ref": "#/components/schemas/indices.update_aliases.Action"
            examples:
              IndicesUpdateAliasesExample1:
                description: An example body for a `POST _aliases` request.
                value: |-
                  {
                    "actions": [
                      {
                        "add": {
                          "index": "logs-nginx.access-prod",
                          "alias": "logs"
                        }
                      }
                    ]
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _aliases
          {
            "actions": [
              {
                "add": {
                  "index": "logs-nginx.access-prod",
                  "alias": "logs"
                }
              }
            ]
          }
      - lang: Python
        source: |-
          resp = client.indices.update_aliases(
              actions=[
                  {
                      "add": {
                          "index": "logs-nginx.access-prod",
                          "alias": "logs"
                      }
                  }
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.updateAliases({
            actions: [
              {
                add: {
                  index: "logs-nginx.access-prod",
                  alias: "logs",
                },
              },
            ],
          });
      - lang: Ruby
        source: |-
          response = client.indices.update_aliases(
            body: {
              "actions": [
                {
                  "add": {
                    "index": "logs-nginx.access-prod",
                    "alias": "logs"
                  }
                }
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->updateAliases([
              "body" => [
                  "actions" => array(
                      [
                          "add" => [
                              "index" => "logs-nginx.access-prod",
                              "alias" => "logs",
                          ],
                      ],
                  ),
              ],
          ]);
      - 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
              .actions(a -> a
                  .add(ad -> ad
                      .alias("logs")
                      .index("logs-nginx.access-prod")
                  )
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_validate/query":
    post:
      tags:
      - indices
      summary: 'Validate a query

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_validate/query</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_validate/query</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_validate/query</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_validate/query</span>\n
        \                     </div>\n                    \n\nValidates a query without
        running it."
      operationId: indices-validate-query
      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"
      requestBody:
        "$ref": "#/components/requestBodies/indices.validate_query"
      responses:
        '200':
          "$ref": "#/components/responses/indices.validate_query-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET my-index-000001/_validate/query?q=user.id:kimchy

          '
      - lang: Python
        source: |-
          resp = client.indices.validate_query(
              index="my-index-000001",
              q="user.id:kimchy",
          )
      - lang: JavaScript
        source: |-
          const response = await client.indices.validateQuery({
            index: "my-index-000001",
            q: "user.id:kimchy",
          });
      - lang: Ruby
        source: |-
          response = client.indices.validate_query(
            index: "my-index-000001",
            q: "user.id:kimchy"
          )
      - lang: PHP
        source: |-
          $resp = $client->indices()->validateQuery([
              "index" => "my-index-000001",
              "q" => "user.id:kimchy",
          ]);
      - 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
              .index("my-index-000001")
              .q("user.id:kimchy")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_inference/chat_completion/{inference_id}/_stream":
    post:
      tags:
      - inference
      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.
        It only works with the `chat_completion` task type.

        NOTE: The `chat_completion` task type is only available within the _stream API and only supports streaming.
        The Chat completion inference API and the Stream inference API differ in their response structure and capabilities.
        The Chat completion inference API provides more comprehensive customization options through more fields and function calling support.
        To determine whether a given inference service supports this task type, please see the page for that service.
      operationId: inference-chat-completion-unified
      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.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Duration"
        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: |-
                  {
                    "model": "gpt-4o",
                    "messages": [
                        {
                            "role": "user",
                            "content": "What is Elastic?"
                        }
                    ]
                  }
              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: |-
                  {
                    "messages": [
                        {
                            "role": "user",
                            "content": [
                                {
                                    "type": "text",
                                    "text": "What's the price of a scarf?"
                                }
                            ]
                        }
                    ],
                    "tools": [
                        {
                            "type": "function",
                            "function": {
                                "name": "get_current_price",
                                "description": "Get the current price of a item",
                                "parameters": {
                                    "type": "object",
                                    "properties": {
                                        "item": {
                                            "id": "123"
                                        }
                                    }
                                }
                            }
                        }
                    ],
                    "tool_choice": {
                        "type": "function",
                        "function": {
                            "name": "get_current_price"
                        }
                    }
                  }
        required: true
      responses:
        '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: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _inference/chat_completion/openai-completion/_stream
          {
            "model": "gpt-4o",
            "messages": [
                {
                    "role": "user",
                    "content": "What is Elastic?"
                }
            ]
          }
      - lang: Python
        source: |-
          resp = client.inference.chat_completion_unified(
              inference_id="openai-completion",
              chat_completion_request={
                  "model": "gpt-4o",
                  "messages": [
                      {
                          "role": "user",
                          "content": "What is Elastic?"
                      }
                  ]
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.chatCompletionUnified({
            inference_id: "openai-completion",
            chat_completion_request: {
              model: "gpt-4o",
              messages: [
                {
                  role: "user",
                  content: "What is Elastic?",
                },
              ],
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.chat_completion_unified(
            inference_id: "openai-completion",
            body: {
              "model": "gpt-4o",
              "messages": [
                {
                  "role": "user",
                  "content": "What is Elastic?"
                }
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->chatCompletionUnified([
              "inference_id" => "openai-completion",
              "body" => [
                  "model" => "gpt-4o",
                  "messages" => array(
                      [
                          "role" => "user",
                          "content" => "What is Elastic?",
                      ],
                  ),
              ],
          ]);
      - 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
              .inferenceId("openai-completion")
              .chatCompletionRequest(ch -> ch
                  .messages(m -> m
                      .content(co -> co
                          .string("What is Elastic?")
                      )
                      .role("user")
                  )
                  .model("gpt-4o")
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/completion/{inference_id}":
    post:
      tags:
      - inference
      summary: Perform completion inference on the service
      description: |-
        Get responses for completion tasks.
        This API works only with the completion task type.

        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, 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.

        This 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: 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.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Duration"
        style: form
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                input:
                  description: |-
                    Inference input.
                    Either 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 <task_type> 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: |-
                  {
                    "input": "What is Elastic?"
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.CompletionInferenceResult"
              examples:
                CompletionResponseExample1:
                  summary: Completion task
                  description: 'A successful response from `POST _inference/completion/openai_completions`.

                    '
                  value: |-
                    {
                      "completion": [
                        {
                          "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."
                        }
                      ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _inference/completion/openai_completions
          {
            "input": "What is Elastic?"
          }
      - lang: Python
        source: |-
          resp = client.inference.completion(
              inference_id="openai_completions",
              input="What is Elastic?",
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.completion({
            inference_id: "openai_completions",
            input: "What is Elastic?",
          });
      - lang: Ruby
        source: |-
          response = client.inference.completion(
            inference_id: "openai_completions",
            body: {
              "input": "What is Elastic?"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->completion([
              "inference_id" => "openai_completions",
              "body" => [
                  "input" => "What is Elastic?",
              ],
          ]);
      - 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
              .inferenceId("openai_completions")
              .input("What is Elastic?")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/{task_type}/{inference_id}":
    get:
      tags:
      - inference
      summary: 'Get an inference endpoint

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_inference</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_inference/{inference_id}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_inference/{task_type}/{inference_id}</span>\n
        \                     </div>\n                    \n\nThis API requires the
        `monitor_inference` cluster privilege (the built-in `inference_admin` and
        `inference_user` roles grant this privilege)."
      operationId: inference-get
      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: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _inference/sparse_embedding/my-elser-model

          '
      - lang: Python
        source: |-
          resp = client.inference.get(
              task_type="sparse_embedding",
              inference_id="my-elser-model",
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.get({
            task_type: "sparse_embedding",
            inference_id: "my-elser-model",
          });
      - lang: Ruby
        source: |-
          response = client.inference.get(
            task_type: "sparse_embedding",
            inference_id: "my-elser-model"
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->get([
              "task_type" => "sparse_embedding",
              "inference_id" => "my-elser-model",
          ]);
      - 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
              .inferenceId("my-elser-model")
              .taskType(TaskType.SparseEmbedding)
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
    put:
      tags:
      - inference
      summary: 'Create an inference endpoint

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/_inference/{inference_id}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/_inference/{task_type}/{inference_id}</span>\n
        \                     </div>\n                    \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, 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`)\n\n## Required authorization\n\n*
        Cluster privileges: `manage_inference`\n"
      operationId: inference-put
      parameters:
      - "$ref": "#/components/parameters/inference.put-task_type"
      - "$ref": "#/components/parameters/inference.put-inference_id"
      - "$ref": "#/components/parameters/inference.put-timeout"
      requestBody:
        "$ref": "#/components/requestBodies/inference.put"
      responses:
        '200':
          "$ref": "#/components/responses/inference.put-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/rerank/my-rerank-model
          {
           "service": "cohere",
           "service_settings": {
             "model_id": "rerank-english-v3.0",
             "api_key": "{{COHERE_API_KEY}}"
           }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="rerank",
              inference_id="my-rerank-model",
              inference_config={
                  "service": "cohere",
                  "service_settings": {
                      "model_id": "rerank-english-v3.0",
                      "api_key": "{{COHERE_API_KEY}}"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "rerank",
            inference_id: "my-rerank-model",
            inference_config: {
              service: "cohere",
              service_settings: {
                model_id: "rerank-english-v3.0",
                api_key: "{{COHERE_API_KEY}}",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "rerank",
            inference_id: "my-rerank-model",
            body: {
              "service": "cohere",
              "service_settings": {
                "model_id": "rerank-english-v3.0",
                "api_key": "{{COHERE_API_KEY}}"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "rerank",
              "inference_id" => "my-rerank-model",
              "body" => [
                  "service" => "cohere",
                  "service_settings" => [
                      "model_id" => "rerank-english-v3.0",
                      "api_key" => "{{COHERE_API_KEY}}",
                  ],
              ],
          ]);
      - 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
              .inferenceId("my-rerank-model")
              .taskType(TaskType.Rerank)
              .inferenceConfig(i -> i
                  .service("cohere")
                  .serviceSettings(JsonData.fromJson("{\"model_id\":\"rerank-english-v3.0\",\"api_key\":\"{{COHERE_API_KEY}}\"}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
    post:
      tags:
      - inference
      summary: 'Perform inference on the service

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_inference/{inference_id}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_inference/{task_type}/{inference_id}</span>\n
        \                     </div>\n                    \n\nThis 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.\n\n##
        Required authorization\n\n* Cluster privileges: `monitor_inference`\n"
      operationId: inference-inference
      parameters:
      - "$ref": "#/components/parameters/inference.inference-task_type"
      - "$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: Generally available
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
    delete:
      tags:
      - inference
      summary: 'Delete an inference endpoint

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb delete\">DELETE</span>\n                      <span
        class=\"operation-path\">/_inference/{inference_id}</span>\n                      </div>\n
        \                   <div>\n                      <span class=\"operation-verb
        delete\">DELETE</span>\n                      <span class=\"operation-path\">/_inference/{task_type}/{inference_id}</span>\n
        \                     </div>\n                    \n\nThis API requires the
        manage_inference cluster privilege (the built-in `inference_admin` role grants
        this privilege)."
      operationId: inference-delete
      parameters:
      - "$ref": "#/components/parameters/inference.delete-task_type"
      - "$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: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE /_inference/sparse_embedding/my-elser-model

          '
      - lang: Python
        source: |-
          resp = client.inference.delete(
              task_type="sparse_embedding",
              inference_id="my-elser-model",
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.delete({
            task_type: "sparse_embedding",
            inference_id: "my-elser-model",
          });
      - lang: Ruby
        source: |-
          response = client.inference.delete(
            task_type: "sparse_embedding",
            inference_id: "my-elser-model"
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->delete([
              "task_type" => "sparse_embedding",
              "inference_id" => "my-elser-model",
          ]);
      - 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
              .inferenceId("my-elser-model")
              .taskType(TaskType.SparseEmbedding)
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/embedding/{inference_id}":
    post:
      tags:
      - inference
      summary: Perform dense embedding inference on the service
      operationId: inference-embedding
      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.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Duration"
        style: form
      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: |-
                  {
                    "input": [
                        {
                            "content": {
                                "type": "image",
                                "format": "base64",
                                "value": "data:image/jpg;base64,..."
                            }
                        },
                        {
                            "content": {
                                "type": "text",
                                "value": "Some text to create an embedding"
                            }
                        }
                    ]
                  }
              EmbeddingRequestExample2:
                summary: Text-only embedding task
                description: Run `POST _inference/embedding/my-text-only-endpoint`
                  to generate embeddings from the example text
                value: |-
                  {
                    "input": ["The first text", "The second text"]
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.EmbeddingInferenceResult"
              examples:
                EmbeddingResponseExample1:
                  summary: Multimodal embedding task
                  description: 'An abbreviated response from `POST _inference/embedding/my-multimodal-endpoint`.

                    '
                  value: |-
                    {
                      "embeddings": [
                        {
                          "embedding": [
                            -0.0189209,
                            -0.04174805,
                            0.00854492,
                            0.01556396,
                            0.01928711,
                            -0.00616455,
                            -0.00460815,
                            0.01477051,
                            -0.00656128,
                            0.05419922
                          ]
                        },
                        {
                          "embedding": [
                            -0.01379395,
                            -0.02368164,
                            0.01068115,
                            0.0279541,
                            0.01043701,
                            -7.7057E-4,
                            0.04150391,
                            0.00836182,
                            -0.01135254,
                            0.0246582
                          ]
                        }
                      ]
                    }
                EmbeddingResponseExample2:
                  summary: Text-only embedding task
                  description: 'An abbreviated response from `POST _inference/embedding/my-text-only-endpoint`.

                    '
                  value: |-
                    {
                      "embeddings": [
                        {
                          "embedding": [
                            0.00854492,
                            -0.00616455,
                            -0.0189209,
                            0.01556396,
                            -0.00460815,
                            0.01477051,
                            -0.04174805,
                            0.01928711,
                            -0.00656128,
                            0.05419922
                          ]
                        },
                        {
                          "embedding": [
                            -0.01135254,
                            0.0279541,
                            -0.02368164,
                            0.01068115,
                            0.01043701,
                            0.04150391,
                            0.00836182,
                            -7.7057E-4,
                            -0.01379395,
                            0.0246582
                          ]
                        }
                      ]
                    }
      x-state: Technical preview
      x-codeSamples:
      - lang: Console
        source: |-
          POST _inference/embedding/my-multimodal-endpoint
          {
            "input": [
                {
                    "content": {
                        "type": "image",
                        "format": "base64",
                        "value": "data:image/jpg;base64,..."
                    }
                },
                {
                    "content": {
                        "type": "text",
                        "value": "Some text to create an embedding"
                    }
                }
            ]
          }
      - lang: Python
        source: |-
          resp = client.inference.embedding(
              inference_id="my-multimodal-endpoint",
              embedding={
                  "input": [
                      {
                          "content": {
                              "type": "image",
                              "format": "base64",
                              "value": "data:image/jpg;base64,..."
                          }
                      },
                      {
                          "content": {
                              "type": "text",
                              "value": "Some text to create an embedding"
                          }
                      }
                  ]
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.embedding({
            inference_id: "my-multimodal-endpoint",
            embedding: {
              input: [
                {
                  content: {
                    type: "image",
                    format: "base64",
                    value: "data:image/jpg;base64,...",
                  },
                },
                {
                  content: {
                    type: "text",
                    value: "Some text to create an embedding",
                  },
                },
              ],
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.embedding(
            inference_id: "my-multimodal-endpoint",
            body: {
              "input": [
                {
                  "content": {
                    "type": "image",
                    "format": "base64",
                    "value": "data:image/jpg;base64,..."
                  }
                },
                {
                  "content": {
                    "type": "text",
                    "value": "Some text to create an embedding"
                  }
                }
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->embedding([
              "inference_id" => "my-multimodal-endpoint",
              "body" => [
                  "input" => array(
                      [
                          "content" => [
                              "type" => "image",
                              "format" => "base64",
                              "value" => "data:image/jpg;base64,...",
                          ],
                      ],
                      [
                          "content" => [
                              "type" => "text",
                              "value" => "Some text to create an embedding",
                          ],
                      ],
                  ),
              ],
          ]);
      - 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
        name: product_name
  "/_inference/{task_type}/{ai21_inference_id}":
    put:
      tags:
      - inference
      summary: Create a AI21 inference endpoint
      description: |
        Create an inference endpoint to perform an inference task with the `ai21` service.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      operationId: inference-put-ai21
      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
      - 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:
                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':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAi21"
      x-state: Generally available
      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(
              task_type="completion",
              inference_id="ai21-completion",
              inference_config={
                  "service": "ai21",
                  "service_settings": {
                      "api_key": "ai21-api-key",
                      "model_id": "jamba-large"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "completion",
            inference_id: "ai21-completion",
            inference_config: {
              service: "ai21",
              service_settings: {
                api_key: "ai21-api-key",
                model_id: "jamba-large",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "completion",
            inference_id: "ai21-completion",
            body: {
              "service": "ai21",
              "service_settings": {
                "api_key": "ai21-api-key",
                "model_id": "jamba-large"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "completion",
              "inference_id" => "ai21-completion",
              "body" => [
                  "service" => "ai21",
                  "service_settings" => [
                      "api_key" => "ai21-api-key",
                      "model_id" => "jamba-large",
                  ],
              ],
          ]);
      - 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
              .inferenceId("ai21-completion")
              .taskType(TaskType.Completion)
              .inferenceConfig(i -> i
                  .service("ai21")
                  .serviceSettings(JsonData.fromJson("{\"api_key\":\"ai21-api-key\",\"model_id\":\"jamba-large\"}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_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.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      operationId: inference-put-alibabacloud
      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.AlibabaCloudTaskType"
        style: simple
      - 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
      - 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.
                    Applies only to the `sparse_embedding` or `text_embedding` task types.
                    Not 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.
                    These 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: |-
                  {
                      "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"
                      }
                  }
              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: |-
                  {
                      "service": "alibabacloud-ai-search",
                      "service_settings": {
                          "api_key": "AlibabaCloud-API-Key",
                          "service_id": "ops-bge-reranker-larger",
                          "host": "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com",
                          "workspace": "default"
                      }
                  }
              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: |-
                  {
                      "service": "alibabacloud-ai-search",
                      "service_settings": {
                          "api_key": "AlibabaCloud-API-Key",
                          "service_id": "ops-text-sparse-embedding-001",
                          "host": "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com",
                          "workspace": "default"
                      }
                  }
              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: |-
                  {
                      "service": "alibabacloud-ai-search",
                      "service_settings": {
                          "api_key": "AlibabaCloud-API-Key",
                          "service_id": "ops-text-embedding-001",
                          "host": "default-j01.platform-cn-shanghai.opensearch.aliyuncs.com",
                          "workspace": "default"
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAlibabaCloudAI"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/completion/alibabacloud_ai_search_completion
          {
              "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"
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="completion",
              inference_id="alibabacloud_ai_search_completion",
              inference_config={
                  "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"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "completion",
            inference_id: "alibabacloud_ai_search_completion",
            inference_config: {
              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",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "completion",
            inference_id: "alibabacloud_ai_search_completion",
            body: {
              "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"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "completion",
              "inference_id" => "alibabacloud_ai_search_completion",
              "body" => [
                  "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",
                  ],
              ],
          ]);
      - 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
              .inferenceId("alibabacloud_ai_search_completion")
              .taskType(TaskType.Completion)
              .inferenceConfig(i -> i
                  .service("alibabacloud-ai-search")
                  .serviceSettings(JsonData.fromJson("{\"host\":\"default-j01.platform-cn-shanghai.opensearch.aliyuncs.com\",\"api_key\":\"AlibabaCloud-API-Key\",\"service_id\":\"ops-qwen-turbo\",\"workspace\":\"default\"}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/{task_type}/{amazonbedrock_inference_id}":
    put:
      tags:
      - inference
      summary: Create an Amazon Bedrock inference endpoint
      description: |
        Create an inference endpoint to perform an inference task with the `amazonbedrock` service.

        >info
        > 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.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      operationId: inference-put-amazonbedrock
      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.AmazonBedrockTaskType"
        style: simple
      - in: path
        name: amazonbedrock_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.
                    Applies only to the `text_embedding` task type.
                    Not applicable to the `chat_completion` and `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, `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.
                    These 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: |-
                  {
                      "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"
                      }
                  }
              PutAmazonBedrockRequestExample2:
                summary: A completion task
                description: Run `PUT _inference/completion/amazon_bedrock_completion`
                  to create an inference endpoint to perform a completion task.
                value: |-
                  {
                      "service": "amazonbedrock",
                      "service_settings": {
                          "access_key": "AWS-access-key",
                          "secret_key": "AWS-secret-key",
                          "region": "us-east-1",
                          "provider": "amazontitan",
                          "model": "amazon.titan-text-premier-v1:0"
                      }
                  }
              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: |-
                  {
                      "service": "amazonbedrock",
                      "service_settings": {
                          "access_key": "AWS-access-key",
                          "secret_key": "AWS-secret-key",
                          "region": "us-east-1",
                          "provider": "amazontitan",
                          "model": "amazon.titan-text-premier-v1:0"
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAmazonBedrock"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/text_embedding/amazon_bedrock_embeddings
          {
              "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"
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="text_embedding",
              inference_id="amazon_bedrock_embeddings",
              inference_config={
                  "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"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "text_embedding",
            inference_id: "amazon_bedrock_embeddings",
            inference_config: {
              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",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "text_embedding",
            inference_id: "amazon_bedrock_embeddings",
            body: {
              "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"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "text_embedding",
              "inference_id" => "amazon_bedrock_embeddings",
              "body" => [
                  "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",
                  ],
              ],
          ]);
      - 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
              .inferenceId("amazon_bedrock_embeddings")
              .taskType(TaskType.TextEmbedding)
              .inferenceConfig(i -> i
                  .service("amazonbedrock")
                  .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\"}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/{task_type}/{amazonsagemaker_inference_id}":
    put:
      tags:
      - inference
      summary: Create an Amazon SageMaker inference endpoint
      description: |
        Create an inference endpoint to perform an inference task with the `amazon_sagemaker` service.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      operationId: inference-put-amazonsagemaker
      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.TaskTypeAmazonSageMaker"
        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: 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.
                    Applies only to the `sparse_embedding` or `text_embedding` task types.
                    Not 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, `amazon_sagemaker`.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.AmazonSageMakerServiceType"
                service_settings:
                  description: |-
                    Settings used to install the inference model.
                    These 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.
                    These 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:
              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: |-
                  {
                      "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"
                      }
                  }
              PutAmazonSageMakerRequestExample2:
                summary: A completion task
                description: Run `PUT _inference/completion/amazon_sagemaker_completion`
                  to create an inference endpoint that performs a completion task.
                value: |-
                  {
                      "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"
                      }
                  }
              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: |-
                  {
                      "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"
                      }
                  }
              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: |-
                  {
                      "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"
                      }
                  }
              PutAmazonSageMakerRequestExample5:
                summary: A rerank task
                description: Run `PUT _inference/rerank/amazon_sagemaker_rerank` to
                  create an inference endpoint that performs a rerank task.
                value: |-
                  {
                      "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"
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAmazonSageMaker"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/text_embedding/amazon_sagemaker_embeddings
          {
              "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"
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="text_embedding",
              inference_id="amazon_sagemaker_embeddings",
              inference_config={
                  "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"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "text_embedding",
            inference_id: "amazon_sagemaker_embeddings",
            inference_config: {
              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",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "text_embedding",
            inference_id: "amazon_sagemaker_embeddings",
            body: {
              "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"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "text_embedding",
              "inference_id" => "amazon_sagemaker_embeddings",
              "body" => [
                  "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",
                  ],
              ],
          ]);
      - 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
              .inferenceId("amazon_sagemaker_embeddings")
              .taskType(TaskType.TextEmbedding)
              .inferenceConfig(i -> i
                  .service("amazon_sagemaker")
                  .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\"}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_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.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      operationId: inference-put-anthropic
      parameters:
      - in: path
        name: task_type
        description: |-
          The task type.
          The 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
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                service:
                  description: The type of service supported for the specified task
                    type. In this case, `anthropic`.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.AnthropicServiceType"
                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"
                task_settings:
                  description: |-
                    Settings to configure the inference task.
                    These settings are specific to the task type you specified.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.AnthropicTaskSettings"
              required:
              - service
              - service_settings
            examples:
              PutAnthropicRequestExample1:
                description: Run `PUT _inference/completion/anthropic_completion`
                  to create an inference endpoint that performs a completion task.
                value: |-
                  {
                      "service": "anthropic",
                      "service_settings": {
                          "api_key": "Anthropic-Api-Key",
                          "model_id": "Model-ID"
                      },
                      "task_settings": {
                          "max_tokens": 1024
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAnthropic"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/completion/anthropic_completion
          {
              "service": "anthropic",
              "service_settings": {
                  "api_key": "Anthropic-Api-Key",
                  "model_id": "Model-ID"
              },
              "task_settings": {
                  "max_tokens": 1024
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="completion",
              inference_id="anthropic_completion",
              inference_config={
                  "service": "anthropic",
                  "service_settings": {
                      "api_key": "Anthropic-Api-Key",
                      "model_id": "Model-ID"
                  },
                  "task_settings": {
                      "max_tokens": 1024
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "completion",
            inference_id: "anthropic_completion",
            inference_config: {
              service: "anthropic",
              service_settings: {
                api_key: "Anthropic-Api-Key",
                model_id: "Model-ID",
              },
              task_settings: {
                max_tokens: 1024,
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "completion",
            inference_id: "anthropic_completion",
            body: {
              "service": "anthropic",
              "service_settings": {
                "api_key": "Anthropic-Api-Key",
                "model_id": "Model-ID"
              },
              "task_settings": {
                "max_tokens": 1024
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "completion",
              "inference_id" => "anthropic_completion",
              "body" => [
                  "service" => "anthropic",
                  "service_settings" => [
                      "api_key" => "Anthropic-Api-Key",
                      "model_id" => "Model-ID",
                  ],
                  "task_settings" => [
                      "max_tokens" => 1024,
                  ],
              ],
          ]);
      - 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
              .inferenceId("anthropic_completion")
              .taskType(TaskType.Completion)
              .inferenceConfig(i -> i
                  .service("anthropic")
                  .serviceSettings(JsonData.fromJson("{\"api_key\":\"Anthropic-Api-Key\",\"model_id\":\"Model-ID\"}"))
                  .taskSettings(JsonData.fromJson("{\"max_tokens\":1024}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/{task_type}/{azureaistudio_inference_id}":
    put:
      tags:
      - inference
      summary: Create an Azure AI studio inference endpoint
      description: |
        Create an inference endpoint to perform an inference task with the `azureaistudio` service.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      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.
                    Applies only to the `text_embedding` task type.
                    Not 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, `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.
                    These settings are specific to the task type you specified.
                  allOf:
                  - "$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: |-
                  {
                      "service": "azureaistudio",
                      "service_settings": {
                          "api_key": "Azure-AI-Studio-API-key",
                          "target": "Target-Uri",
                          "provider": "openai",
                          "endpoint_type": "token"
                      }
                  }
              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: |-
                  {
                      "service": "azureaistudio",
                      "service_settings": {
                          "api_key": "Azure-AI-Studio-API-key",
                          "target": "Target-URI",
                          "provider": "databricks",
                          "endpoint_type": "realtime"
                      }
                  }
              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: |-
                  {
                      "service": "azureaistudio",
                      "service_settings": {
                          "api_key": "Azure-AI-Studio-API-key",
                          "target": "Target-URI",
                          "provider": "cohere",
                          "endpoint_type": "token"
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoAzureAIStudio"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/text_embedding/azure_ai_studio_embeddings
          {
              "service": "azureaistudio",
              "service_settings": {
                  "api_key": "Azure-AI-Studio-API-key",
                  "target": "Target-Uri",
                  "provider": "openai",
                  "endpoint_type": "token"
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="text_embedding",
              inference_id="azure_ai_studio_embeddings",
              inference_config={
                  "service": "azureaistudio",
                  "service_settings": {
                      "api_key": "Azure-AI-Studio-API-key",
                      "target": "Target-Uri",
                      "provider": "openai",
                      "endpoint_type": "token"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "text_embedding",
            inference_id: "azure_ai_studio_embeddings",
            inference_config: {
              service: "azureaistudio",
              service_settings: {
                api_key: "Azure-AI-Studio-API-key",
                target: "Target-Uri",
                provider: "openai",
                endpoint_type: "token",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "text_embedding",
            inference_id: "azure_ai_studio_embeddings",
            body: {
              "service": "azureaistudio",
              "service_settings": {
                "api_key": "Azure-AI-Studio-API-key",
                "target": "Target-Uri",
                "provider": "openai",
                "endpoint_type": "token"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "text_embedding",
              "inference_id" => "azure_ai_studio_embeddings",
              "body" => [
                  "service" => "azureaistudio",
                  "service_settings" => [
                      "api_key" => "Azure-AI-Studio-API-key",
                      "target" => "Target-Uri",
                      "provider" => "openai",
                      "endpoint_type" => "token",
                  ],
              ],
          ]);
      - 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
              .inferenceId("azure_ai_studio_embeddings")
              .taskType(TaskType.TextEmbedding)
              .inferenceConfig(i -> i
                  .service("azureaistudio")
                  .serviceSettings(JsonData.fromJson("{\"api_key\":\"Azure-AI-Studio-API-key\",\"target\":\"Target-Uri\",\"provider\":\"openai\",\"endpoint_type\":\"token\"}"))
              )
          );
      x-metaTags:
      - 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.

        The list of chat completion models that you can choose from in your Azure OpenAI deployment include:

        * [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)
        * [GPT-3.5](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions#gpt-35)

        The 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).

        ## Required authorization

        * Cluster privileges: `manage_inference`
      operationId: inference-put-azureopenai
      parameters:
      - in: path
        name: task_type
        description: |-
          The type of the inference task that the model will perform.
          NOTE: 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
      - 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
      - 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.
                    Applies only to the `text_embedding` task type.
                    Not 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.
                    These 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: |-
                  {
                      "service": "azureopenai",
                      "service_settings": {
                          "api_key": "Api-Key",
                          "resource_name": "Resource-name",
                          "deployment_id": "Deployment-id",
                          "api_version": "2024-02-01"
                      }
                  }
              PutAzureOpenAiRequestExample2:
                summary: A completion task
                description: Run `PUT _inference/completion/azure_openai_completion`
                  to create an inference endpoint that performs a `completion` task.
                value: |-
                  {
                      "service": "azureopenai",
                      "service_settings": {
                          "api_key": "Api-Key",
                          "resource_name": "Resource-name",
                          "deployment_id": "Deployment-id",
                          "api_version": "2024-02-01"
                      }
                  }
              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: |-
                  {
                      "service": "azureopenai",
                      "service_settings": {
                          "api_key": "Api-Key",
                          "resource_name": "Resource-name",
                          "deployment_id": "Deployment-id",
                          "api_version": "2024-02-01"
                      }
                  }
        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: |-
                    {
                      "inference_id": "azure_openai_embeddings",
                      "task_type": "text_embedding",
                      "service": "azureopenai",
                      "service_settings": {
                        "resource_name": "Resource-name",
                        "deployment_id": "Deployment-id",
                        "api_version": "2024-02-01",
                        "rate_limit": {
                          "requests_per_minute": 1140
                        },
                        "dimensions": 1536,
                        "similarity": "dot_product"
                      },
                      "chunking_settings": {
                        "strategy": "sentence",
                        "max_chunk_size": 250,
                        "sentence_overlap": 1
                      }
                    }
                PutAzureOpenAiResponseExample2:
                  summary: A completion task
                  description: A successful response when creating an Azure OpenAI
                    `completion` inference endpoint.
                  value: |-
                    {
                      "inference_id": "azure_openai_completion",
                      "task_type": "completion",
                      "service": "azureopenai",
                      "service_settings": {
                        "resource_name": "Resource-name",
                        "deployment_id": "Deployment-id",
                        "api_version": "2024-02-01",
                        "rate_limit": {
                          "requests_per_minute": 120
                        }
                      }
                    }
                PutAzureOpenAiResponseExample3:
                  summary: A chat completion task
                  description: A successful response when creating an Azure OpenAI
                    `chat_completion` inference endpoint.
                  value: |-
                    {
                      "inference_id": "azure_openai_chat_completion",
                      "task_type": "chat_completion",
                      "service": "azureopenai",
                      "service_settings": {
                        "resource_name": "Resource-name",
                        "deployment_id": "Deployment-id",
                        "api_version": "2024-02-01",
                        "rate_limit": {
                          "requests_per_minute": 120
                        }
                      }
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/text_embedding/azure_openai_embeddings
          {
              "service": "azureopenai",
              "service_settings": {
                  "api_key": "Api-Key",
                  "resource_name": "Resource-name",
                  "deployment_id": "Deployment-id",
                  "api_version": "2024-02-01"
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="text_embedding",
              inference_id="azure_openai_embeddings",
              inference_config={
                  "service": "azureopenai",
                  "service_settings": {
                      "api_key": "Api-Key",
                      "resource_name": "Resource-name",
                      "deployment_id": "Deployment-id",
                      "api_version": "2024-02-01"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "text_embedding",
            inference_id: "azure_openai_embeddings",
            inference_config: {
              service: "azureopenai",
              service_settings: {
                api_key: "Api-Key",
                resource_name: "Resource-name",
                deployment_id: "Deployment-id",
                api_version: "2024-02-01",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "text_embedding",
            inference_id: "azure_openai_embeddings",
            body: {
              "service": "azureopenai",
              "service_settings": {
                "api_key": "Api-Key",
                "resource_name": "Resource-name",
                "deployment_id": "Deployment-id",
                "api_version": "2024-02-01"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "text_embedding",
              "inference_id" => "azure_openai_embeddings",
              "body" => [
                  "service" => "azureopenai",
                  "service_settings" => [
                      "api_key" => "Api-Key",
                      "resource_name" => "Resource-name",
                      "deployment_id" => "Deployment-id",
                      "api_version" => "2024-02-01",
                  ],
              ],
          ]);
      - 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
              .inferenceId("azure_openai_embeddings")
              .taskType(TaskType.TextEmbedding)
              .inferenceConfig(i -> i
                  .service("azureopenai")
                  .serviceSettings(JsonData.fromJson("{\"api_key\":\"Api-Key\",\"resource_name\":\"Resource-name\",\"deployment_id\":\"Deployment-id\",\"api_version\":\"2024-02-01\"}"))
              )
          );
      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.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      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
        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.
                    Applies only to the `text_embedding` task type.
                    Not applicable to the `rerank` or `completion` task type.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings"
                service:
                  description: The type of service supported for the specified task
                    type. In this case, `cohere`.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.CohereServiceType"
                service_settings:
                  description: |-
                    Settings used to install the inference model.
                    These settings are specific to the `cohere` service.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.CohereServiceSettings"
                task_settings:
                  description: |-
                    Settings to configure the inference task.
                    These settings are specific to the task type you specified.
                  allOf:
                  - "$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: |-
                  {
                      "service": "cohere",
                      "service_settings": {
                          "api_key": "Cohere-Api-key",
                          "model_id": "embed-english-light-v3.0",
                          "embedding_type": "byte"
                      }
                  }
              PutCohereRequestExample2:
                summary: A rerank task
                description: Run `PUT _inference/rerank/cohere-rerank` to create an
                  inference endpoint that performs a rerank task.
                value: |-
                  {
                      "service": "cohere",
                      "service_settings": {
                          "api_key": "Cohere-API-key",
                          "model_id": "rerank-english-v3.0"
                      },
                      "task_settings": {
                          "top_n": 10,
                          "return_documents": true
                      }
                  }
              PutCohereRequestExample3:
                summary: A completion task
                description: Run `PUT _inference/completion/cohere-completion` to
                  create an inference endpoint that performs a completion task.
                value: |-
                  {
                      "service": "cohere",
                      "service_settings": {
                          "api_key": "Cohere-API-key",
                          "model_id": "command-a-03-2025"
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoCohere"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/text_embedding/cohere-embeddings
          {
              "service": "cohere",
              "service_settings": {
                  "api_key": "Cohere-Api-key",
                  "model_id": "embed-english-light-v3.0",
                  "embedding_type": "byte"
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="text_embedding",
              inference_id="cohere-embeddings",
              inference_config={
                  "service": "cohere",
                  "service_settings": {
                      "api_key": "Cohere-Api-key",
                      "model_id": "embed-english-light-v3.0",
                      "embedding_type": "byte"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "text_embedding",
            inference_id: "cohere-embeddings",
            inference_config: {
              service: "cohere",
              service_settings: {
                api_key: "Cohere-Api-key",
                model_id: "embed-english-light-v3.0",
                embedding_type: "byte",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "text_embedding",
            inference_id: "cohere-embeddings",
            body: {
              "service": "cohere",
              "service_settings": {
                "api_key": "Cohere-Api-key",
                "model_id": "embed-english-light-v3.0",
                "embedding_type": "byte"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "text_embedding",
              "inference_id" => "cohere-embeddings",
              "body" => [
                  "service" => "cohere",
                  "service_settings" => [
                      "api_key" => "Cohere-Api-key",
                      "model_id" => "embed-english-light-v3.0",
                      "embedding_type" => "byte",
                  ],
              ],
          ]);
      - 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
              .inferenceId("cohere-embeddings")
              .taskType(TaskType.TextEmbedding)
              .inferenceConfig(i -> i
                  .service("cohere")
                  .serviceSettings(JsonData.fromJson("{\"api_key\":\"Cohere-Api-key\",\"model_id\":\"embed-english-light-v3.0\",\"embedding_type\":\"byte\"}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/{task_type}/{contextualai_inference_id}":
    put:
      tags:
      - inference
      summary: Create an Contextual AI inference endpoint
      description: |
        Create an inference endpoint to perform an inference task with the `contexualai` service.

        To review the available `rerank` models, refer to <https://docs.contextual.ai/api-reference/rerank/rerank#body-model>.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      operationId: inference-put-contextualai
      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.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:
        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.
                    These 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: |-
                  {
                      "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
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoContextualAi"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/rerank/contextualai-rerank
          {
              "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
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="rerank",
              inference_id="contextualai-rerank",
              inference_config={
                  "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
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "rerank",
            inference_id: "contextualai-rerank",
            inference_config: {
              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,
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "rerank",
            inference_id: "contextualai-rerank",
            body: {
              "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
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "rerank",
              "inference_id" => "contextualai-rerank",
              "body" => [
                  "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,
                  ],
              ],
          ]);
      - 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
              .inferenceId("contextualai-rerank")
              .taskType(TaskType.Rerank)
              .inferenceConfig(i -> i
                  .service("contextualai")
                  .serviceSettings(JsonData.fromJson("{\"api_key\":\"ContextualAI-Api-key\",\"model_id\":\"ctxl-rerank-v2-instruct-multilingual-mini\"}"))
                  .taskSettings(JsonData.fromJson("{\"instruction\":\"Rerank the following documents based on their relevance to the query.\",\"top_k\":3}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/{task_type}/{custom_inference_id}":
    put:
      tags:
      - inference
      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.
        The custom service gives you the ability to define the headers, url, query parameters, request body, and secrets.
        The 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.
        Templates are portions of a string that start with `${` and end with `}`.
        The 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`.
        If the definition (key) is not found for a template, an error message is returned.
        In case of an endpoint definition like the following:
        ```
        PUT _inference/text_embedding/test-text-embedding
        {
          "service": "custom",
          "service_settings": {
             "secret_parameters": {
                  "api_key": "<some api key>"
             },
             "url": "...endpoints.huggingface.cloud/v1/embeddings",
             "headers": {
                 "Authorization": "Bearer ${api_key}",
                 "Content-Type": "application/json"
             },
             "request": "{\"input\": ${input}}",
             "response": {
                 "json_parser": {
                     "text_embeddings":"$.data[*].embedding[*]"
                 }
             }
          }
        }
        ```
        To replace `${api_key}` the `secret_parameters` and `task_settings` are checked for a key named `api_key`.

        > info
        > Templates should not be surrounded by quotes.

        Pre-defined templates:
        * `${input}` refers to the array of input strings that comes from the `input` field of the subsequent inference requests.
        * `${input_type}` refers to the input type translation values.
        * `${query}` refers to the query field used specifically for reranking tasks.
        * `${top_n}` refers to the `top_n` field available when performing rerank requests.
        * `${return_documents}` refers to the `return_documents` field available when performing rerank requests.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      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
      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.
                    Applies only to the `sparse_embedding` or `text_embedding` task types.
                    Not 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, `custom`.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.CustomServiceType"
                service_settings:
                  description: |-
                    Settings used to install the inference model.
                    These settings are specific to the `custom` service.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.CustomServiceSettings"
                task_settings:
                  description: |-
                    Settings to configure the inference task.
                    These settings are specific to the task type you specified.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.CustomTaskSettings"
              required:
              - service
              - service_settings
            examples:
              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: |-
                  {
                      "service": "custom",
                      "service_settings": {
                          "secret_parameters": {
                              "api_key": "<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[*]"
                              }
                          }
                      }
                  }
              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: |-
                  {
                    "service": "custom",
                    "service_settings": {
                        "secret_parameters": {
                            "api_key": "<api key>"
                        },
                        "url": "https://api.cohere.com/v2/rerank",
                        "headers": {
                            "Authorization": "bearer ${api_key}",
                            "Content-Type": "application/json"
                        },
                        "request": "{\"documents\": ${input}, \"query\": ${query}, \"model\": \"rerank-v3.5\"}",
                        "response": {
                            "json_parser": {
                                "reranked_index":"$.results[*].index",
                                "relevance_score":"$.results[*].relevance_score"
                            }
                        }
                    }
                  }
              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: |-
                  {
                    "service": "custom",
                    "service_settings": {
                        "secret_parameters": {
                            "api_key": "<api key>"
                        },
                        "url": "https://api.cohere.com/v2/embed",
                        "headers": {
                            "Authorization": "bearer ${api_key}",
                            "Content-Type": "application/json"
                        },
                        "request": "{\"texts\": ${input}, \"model\": \"embed-v4.0\", \"input_type\": ${input_type}}",
                        "response": {
                            "json_parser": {
                                "text_embeddings":"$.embeddings.float[*]"
                            }
                        },
                        "input_type": {
                            "translation": {
                                "ingest": "search_document",
                                "search": "search_query"
                            },
                            "default": "search_document"
                        }
                    }
                  }
              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\": \"<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: |-
                  {
                    "service": "custom",
                    "service_settings": {
                        "secret_parameters": {
                            "api_key": "<api key>"
                        },
                        "url": "<dedicated inference endpoint on HF>/v1/embeddings",
                        "headers": {
                            "Authorization": "Bearer ${api_key}",
                            "Content-Type": "application/json"
                        },
                        "request": "{\"input\": ${input}}",
                        "response": {
                            "json_parser": {
                                "text_embeddings":"$.data[*].embedding[*]"
                            }
                        }
                    }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoCustom"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/text_embedding/custom-embeddings
          {
              "service": "custom",
              "service_settings": {
                  "secret_parameters": {
                      "api_key": "<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[*]"
                      }
                  }
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="text_embedding",
              inference_id="custom-embeddings",
              inference_config={
                  "service": "custom",
                  "service_settings": {
                      "secret_parameters": {
                          "api_key": "<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[*]"
                          }
                      }
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "text_embedding",
            inference_id: "custom-embeddings",
            inference_config: {
              service: "custom",
              service_settings: {
                secret_parameters: {
                  api_key: "<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[*]",
                  },
                },
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "text_embedding",
            inference_id: "custom-embeddings",
            body: {
              "service": "custom",
              "service_settings": {
                "secret_parameters": {
                  "api_key": "<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[*]"
                  }
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "text_embedding",
              "inference_id" => "custom-embeddings",
              "body" => [
                  "service" => "custom",
                  "service_settings" => [
                      "secret_parameters" => [
                          "api_key" => "<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[*]",
                          ],
                      ],
                  ],
              ],
          ]);
      - 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":"<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
              .inferenceId("custom-embeddings")
              .taskType(TaskType.TextEmbedding)
              .inferenceConfig(i -> i
                  .service("custom")
                  .serviceSettings(JsonData.fromJson("{\"secret_parameters\":{\"api_key\":\"<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[*]\"}}}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/{task_type}/{deepseek_inference_id}":
    put:
      tags:
      - inference
      summary: Create a DeepSeek inference endpoint
      description: |
        Create an inference endpoint to perform an inference task with the `deepseek` service.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      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
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                service:
                  description: The type of service supported for the specified task
                    type. In this case, `deepseek`.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.DeepSeekServiceType"
                service_settings:
                  description: |-
                    Settings used to install the inference model.
                    These settings are specific to the `deepseek` service.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.DeepSeekServiceSettings"
              required:
              - service
              - service_settings
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoDeepSeek"
      x-state: Generally available
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/{task_type}/{elasticsearch_inference_id}":
    put:
      tags:
      - inference
      summary: Create an Elasticsearch inference endpoint
      description: |
        Create an inference endpoint to perform an inference task with the `elasticsearch` service.

        > info
        > 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.

        If 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.

        > info
        > 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.

        After creating the endpoint, wait for the model deployment to complete before using it.
        To verify the deployment status, use the get trained model statistics API.
        Look for `"state": "fully_allocated"` in the response and ensure that the `"allocation_count"` matches the `"target_allocation_count"`.
        Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      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.
          The 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
      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.
                    Applies only to the `sparse_embedding` and `text_embedding` task types.
                    Not 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, `elasticsearch`.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.ElasticsearchServiceType"
                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"
                task_settings:
                  description: |-
                    Settings to configure the inference task.
                    These settings are specific to the task type you specified.
                  allOf:
                  - "$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: |-
                  {
                      "service": "elasticsearch",
                      "service_settings": {
                          "adaptive_allocations": {
                          "enabled": true,
                          "min_number_of_allocations": 3,
                          "max_number_of_allocations": 10
                          },
                          "num_threads": 1,
                          "model_id": ".multilingual-e5-small"
                      }
                  }
              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: |-
                  {
                      "service": "elasticsearch",
                      "service_settings": {
                          "deployment_id": ".elser_model_2"
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          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.

                    '
                  value: |-
                    {
                      "inference_id": "use_existing_deployment",
                      "task_type": "sparse_embedding",
                      "service": "elasticsearch",
                      "service_settings": {
                        "num_allocations": 2,
                        "num_threads": 1,
                        "model_id": ".elser_model_2",
                        "deployment_id": ".elser_model_2"
                      },
                      "chunking_settings": {
                        "strategy": "sentence",
                        "max_chunk_size": 250,
                        "sentence_overlap": 1
                      }
                    }
      x-state: Generally available
      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(
              task_type="sparse_embedding",
              inference_id="my-elser-model",
              inference_config={
                  "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"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "sparse_embedding",
            inference_id: "my-elser-model",
            inference_config: {
              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",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "sparse_embedding",
            inference_id: "my-elser-model",
            body: {
              "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"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "sparse_embedding",
              "inference_id" => "my-elser-model",
              "body" => [
                  "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",
                  ],
              ],
          ]);
      - 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
              .inferenceId("my-elser-model")
              .taskType(TaskType.SparseEmbedding)
              .inferenceConfig(i -> i
                  .service("elasticsearch")
                  .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\"}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/{task_type}/{elser_inference_id}":
    put:
      tags:
      - inference
      summary: Create an ELSER inference endpoint
      description: |
        Create an inference endpoint to perform an inference task with the `elser` service.
        You can also deploy ELSER by using the Elasticsearch inference integration.

        > info
        > 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.

        The API request will automatically download and deploy the ELSER model if it isn't already downloaded.

        > info
        > 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.

        After creating the endpoint, wait for the model deployment to complete before using it.
        To verify the deployment status, use the get trained model statistics API.
        Look for `"state": "fully_allocated"` in the response and ensure that the `"allocation_count"` matches the `"target_allocation_count"`.
        Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      operationId: inference-put-elser
      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.ElserTaskType"
        style: simple
      - 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
      - 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.
                    Note that for ELSER endpoints, the max_chunk_size may not exceed `300`.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings"
                service:
                  description: The type of service supported for the specified task
                    type. In this case, `elser`.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.ElserServiceType"
                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:
              - 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: |-
                  {
                      "service": "elser",
                      "service_settings": {
                          "num_allocations": 1,
                          "num_threads": 1
                      }
                  }
              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: |-
                  {
                      "service": "elser",
                      "service_settings": {
                          "adaptive_allocations": {
                              "enabled": true,
                              "min_number_of_allocations": 3,
                              "max_number_of_allocations": 10
                          },
                          "num_threads": 1
                      }
                  }
        required: true
      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: |-
                    {
                      "inference_id": "my-elser-model",
                      "task_type": "sparse_embedding",
                      "service": "elser",
                      "service_settings": {
                        "num_allocations": 1,
                        "num_threads": 1
                      },
                      "task_settings": {}
                    }
      deprecated: true
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/sparse_embedding/my-elser-model
          {
              "service": "elser",
              "service_settings": {
                  "num_allocations": 1,
                  "num_threads": 1
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="sparse_embedding",
              inference_id="my-elser-model",
              inference_config={
                  "service": "elser",
                  "service_settings": {
                      "num_allocations": 1,
                      "num_threads": 1
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "sparse_embedding",
            inference_id: "my-elser-model",
            inference_config: {
              service: "elser",
              service_settings: {
                num_allocations: 1,
                num_threads: 1,
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "sparse_embedding",
            inference_id: "my-elser-model",
            body: {
              "service": "elser",
              "service_settings": {
                "num_allocations": 1,
                "num_threads": 1
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "sparse_embedding",
              "inference_id" => "my-elser-model",
              "body" => [
                  "service" => "elser",
                  "service_settings" => [
                      "num_allocations" => 1,
                      "num_threads" => 1,
                  ],
              ],
          ]);
      - 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
              .inferenceId("my-elser-model")
              .taskType(TaskType.SparseEmbedding)
              .inferenceConfig(i -> i
                  .service("elser")
                  .serviceSettings(JsonData.fromJson("{\"num_allocations\":1,\"num_threads\":1}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_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.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      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
      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.
                    Applies only to the `text_embedding` task type.
                    Not applicable to the `completion` task type.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings"
                service:
                  description: The type of service supported for the specified task
                    type. In this case, `googleaistudio`.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.GoogleAiServiceType"
                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:
              - 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: |-
                  {
                      "service": "googleaistudio",
                      "service_settings": {
                          "api_key": "api-key",
                          "model_id": "model-id"
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoGoogleAIStudio"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/completion/google_ai_studio_completion
          {
              "service": "googleaistudio",
              "service_settings": {
                  "api_key": "api-key",
                  "model_id": "model-id"
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="completion",
              inference_id="google_ai_studio_completion",
              inference_config={
                  "service": "googleaistudio",
                  "service_settings": {
                      "api_key": "api-key",
                      "model_id": "model-id"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "completion",
            inference_id: "google_ai_studio_completion",
            inference_config: {
              service: "googleaistudio",
              service_settings: {
                api_key: "api-key",
                model_id: "model-id",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "completion",
            inference_id: "google_ai_studio_completion",
            body: {
              "service": "googleaistudio",
              "service_settings": {
                "api_key": "api-key",
                "model_id": "model-id"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "completion",
              "inference_id" => "google_ai_studio_completion",
              "body" => [
                  "service" => "googleaistudio",
                  "service_settings" => [
                      "api_key" => "api-key",
                      "model_id" => "model-id",
                  ],
              ],
          ]);
      - 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
              .inferenceId("google_ai_studio_completion")
              .taskType(TaskType.Completion)
              .inferenceConfig(i -> i
                  .service("googleaistudio")
                  .serviceSettings(JsonData.fromJson("{\"api_key\":\"api-key\",\"model_id\":\"model-id\"}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_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.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      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
      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.
                    Applies only to the `text_embedding` task type.
                    Not 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, `googlevertexai`.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.GoogleVertexAIServiceType"
                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.
                    These settings are specific to the task type you specified.
                  allOf:
                  - "$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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "service_account_json": "service-account-json",
                          "model_id": "model-id",
                          "location": "location",
                          "project_id": "project-id"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "meta",
                          "service_account_json": "service-account-json",
                          "streaming_url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "hugging_face",
                          "service_account_json": "service-account-json",
                          "url": "https://%ENDPOINT_ID%.%LOCATION_ID%-%PROJECT_ID%.prediction.vertexai.goog/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "hugging_face",
                          "service_account_json": "service-account-json",
                          "streaming_url": "https://%ENDPOINT_ID%.%LOCATION_ID%-%PROJECT_ID%.prediction.vertexai.goog/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "hugging_face",
                          "service_account_json": "service-account-json",
                          "url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "hugging_face",
                          "service_account_json": "service-account-json",
                          "streaming_url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "mistral",
                          "model_id": "mistral-small-2503",
                          "service_account_json": "service-account-json",
                          "url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/mistralai/models/%MODEL_ID%:rawPredict",
                          "streaming_url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/mistralai/models/%MODEL_ID%:streamRawPredict"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "mistral",
                          "model_id": "mistral-small-2503",
                          "service_account_json": "service-account-json",
                          "streaming_url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/mistralai/models/%MODEL_ID%:streamRawPredict"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "mistral",
                          "service_account_json": "service-account-json",
                          "url": "https://%ENDPOINT_ID%.%LOCATION_ID%-%PROJECT_ID%.prediction.vertexai.goog/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "mistral",
                          "service_account_json": "service-account-json",
                          "streaming_url": "https://%ENDPOINT_ID%.%LOCATION_ID%-%PROJECT_ID%.prediction.vertexai.goog/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "mistral",
                          "service_account_json": "service-account-json",
                          "url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "service_account_json": "service-account-json",
                          "project_id": "project-id"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "mistral",
                          "service_account_json": "service-account-json",
                          "streaming_url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "ai21",
                          "service_account_json": "service-account-json",
                          "url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/ai21/models/%MODEL_ID%:rawPredict",
                          "streaming_url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/ai21/models/%MODEL_ID%:streamRawPredict"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "ai21",
                          "service_account_json": "service-account-json",
                          "streaming_url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/ai21/models/%MODEL_ID%:streamRawPredict"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "anthropic",
                          "service_account_json": "service-account-json",
                          "url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/anthropic/models/%MODEL_ID%:rawPredict",
                          "streaming_url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/anthropic/models/%MODEL_ID%:streamRawPredict"
                      },
                      "task_settings": {
                          "max_tokens": 128
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "anthropic",
                          "service_account_json": "service-account-json",
                          "streaming_url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/publishers/anthropic/models/%MODEL_ID%:streamRawPredict"
                      },
                      "task_settings": {
                          "max_tokens": 128
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "meta",
                          "model_id": "meta/llama-3.3-70b-instruct-maas",
                          "service_account_json": "service-account-json",
                          "url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/openapi/chat/completions"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "meta",
                          "model_id": "meta/llama-3.3-70b-instruct-maas",
                          "service_account_json": "service-account-json",
                          "streaming_url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/openapi/chat/completions"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "meta",
                          "service_account_json": "service-account-json",
                          "url": "https://%ENDPOINT_ID%.%LOCATION_ID%-fasttryout.prediction.vertexai.goog/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "meta",
                          "service_account_json": "service-account-json",
                          "streaming_url": "https://%ENDPOINT_ID%.%LOCATION_ID%-fasttryout.prediction.vertexai.goog/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
                      }
                  }
              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: |-
                  {
                      "service": "googlevertexai",
                      "service_settings": {
                          "provider": "meta",
                          "service_account_json": "service-account-json",
                          "url": "https://%LOCATION_ID%-aiplatform.googleapis.com/v1/projects/%PROJECT_ID%/locations/%LOCATION_ID%/endpoints/%ENDPOINT_ID%/chat/completions"
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoGoogleVertexAI"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/text_embedding/google_vertex_ai_embeddingss
          {
              "service": "googlevertexai",
              "service_settings": {
                  "service_account_json": "service-account-json",
                  "model_id": "model-id",
                  "location": "location",
                  "project_id": "project-id"
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="text_embedding",
              inference_id="google_vertex_ai_embeddingss",
              inference_config={
                  "service": "googlevertexai",
                  "service_settings": {
                      "service_account_json": "service-account-json",
                      "model_id": "model-id",
                      "location": "location",
                      "project_id": "project-id"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "text_embedding",
            inference_id: "google_vertex_ai_embeddingss",
            inference_config: {
              service: "googlevertexai",
              service_settings: {
                service_account_json: "service-account-json",
                model_id: "model-id",
                location: "location",
                project_id: "project-id",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "text_embedding",
            inference_id: "google_vertex_ai_embeddingss",
            body: {
              "service": "googlevertexai",
              "service_settings": {
                "service_account_json": "service-account-json",
                "model_id": "model-id",
                "location": "location",
                "project_id": "project-id"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "text_embedding",
              "inference_id" => "google_vertex_ai_embeddingss",
              "body" => [
                  "service" => "googlevertexai",
                  "service_settings" => [
                      "service_account_json" => "service-account-json",
                      "model_id" => "model-id",
                      "location" => "location",
                      "project_id" => "project-id",
                  ],
              ],
          ]);
      - 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
              .inferenceId("google_vertex_ai_embeddingss")
              .taskType(TaskType.TextEmbedding)
              .inferenceConfig(i -> i
                  .service("googlevertexai")
                  .serviceSettings(JsonData.fromJson("{\"service_account_json\":\"service-account-json\",\"model_id\":\"model-id\",\"location\":\"location\",\"project_id\":\"project-id\"}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/{task_type}/{groq_inference_id}":
    put:
      tags:
      - inference
      summary: Create a Groq inference endpoint
      description: |
        Create an inference endpoint to perform an inference task with the `groq` service.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      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
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                service:
                  description: The type of service supported for the specified task
                    type. In this case, `groq`.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.GroqServiceType"
                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:
              - service
              - service_settings
            examples:
              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}"
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoGroq"
      x-state: Generally available
      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(
              task_type="chat_completion",
              inference_id="groq-chat-completion",
              inference_config={
                  "service": "groq",
                  "service_settings": {
                      "api_key": "groq-api-key",
                      "model_id": "llama-3.3-70b-versatile"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "chat_completion",
            inference_id: "groq-chat-completion",
            inference_config: {
              service: "groq",
              service_settings: {
                api_key: "groq-api-key",
                model_id: "llama-3.3-70b-versatile",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "chat_completion",
            inference_id: "groq-chat-completion",
            body: {
              "service": "groq",
              "service_settings": {
                "api_key": "groq-api-key",
                "model_id": "llama-3.3-70b-versatile"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "chat_completion",
              "inference_id" => "groq-chat-completion",
              "body" => [
                  "service" => "groq",
                  "service_settings" => [
                      "api_key" => "groq-api-key",
                      "model_id" => "llama-3.3-70b-versatile",
                  ],
              ],
          ]);
      - 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
              .inferenceId("groq-chat-completion")
              .taskType(TaskType.ChatCompletion)
              .inferenceConfig(i -> i
                  .service("groq")
                  .serviceSettings(JsonData.fromJson("{\"api_key\":\"groq-api-key\",\"model_id\":\"llama-3.3-70b-versatile\"}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/{task_type}/{huggingface_inference_id}":
    put:
      tags:
      - inference
      summary: Create a Hugging Face inference endpoint
      description: |
        Create an inference endpoint to perform an inference task with the `hugging_face` service.
        Supported tasks include: `text_embedding`, `completion`, and `chat_completion`.

        To configure the endpoint, first visit the Hugging Face Inference Endpoints page and create a new endpoint.
        Select a model that supports the task you intend to use.

        For Elastic's `text_embedding` task:
        The selected model must support the `Sentence Embeddings` task. On the new endpoint creation page, select the `Sentence Embeddings` task under the `Advanced Configuration` section.
        After the endpoint has initialized, copy the generated endpoint URL.
        Recommended models for `text_embedding` task:

        * `all-MiniLM-L6-v2`
        * `all-MiniLM-L12-v2`
        * `all-mpnet-base-v2`
        * `e5-base-v2`
        * `e5-small-v2`
        * `multilingual-e5-base`
        * `multilingual-e5-small`

        For Elastic's `chat_completion` and `completion` tasks:
        The 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.
        After 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.
        Recommended models for `chat_completion` and `completion` tasks:

        * `Mistral-7B-Instruct-v0.2`
        * `QwQ-32B`
        * `Phi-3-mini-128k-instruct`

        For Elastic's `rerank` task:
        The selected model must support the `sentence-ranking` task and expose OpenAI API.
        HuggingFace supports only dedicated (not serverless) endpoints for `Rerank` so far.
        After the endpoint is initialized, copy the full endpoint URL for use.
        Tested models for `rerank` task:

        * `bge-reranker-base`
        * `jina-reranker-v1-turbo-en-GGUF`

        ## Required authorization

        * Cluster privileges: `manage_inference`
      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
      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.
                    Applies only to the `text_embedding` task type.
                    Not 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, `hugging_face`.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.HuggingFaceServiceType"
                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.
                    These settings are specific to the task type you specified.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.HuggingFaceTaskSettings"
              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}"
              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}"
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoHuggingFace"
      x-state: Generally available
      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(
              task_type="text_embedding",
              inference_id="hugging-face-embeddings",
              inference_config={
                  "service": "hugging_face",
                  "service_settings": {
                      "api_key": "hugging-face-access-token",
                      "url": "url-endpoint"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "text_embedding",
            inference_id: "hugging-face-embeddings",
            inference_config: {
              service: "hugging_face",
              service_settings: {
                api_key: "hugging-face-access-token",
                url: "url-endpoint",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "text_embedding",
            inference_id: "hugging-face-embeddings",
            body: {
              "service": "hugging_face",
              "service_settings": {
                "api_key": "hugging-face-access-token",
                "url": "url-endpoint"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "text_embedding",
              "inference_id" => "hugging-face-embeddings",
              "body" => [
                  "service" => "hugging_face",
                  "service_settings" => [
                      "api_key" => "hugging-face-access-token",
                      "url" => "url-endpoint",
                  ],
              ],
          ]);
      - 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
              .inferenceId("hugging-face-embeddings")
              .taskType(TaskType.TextEmbedding)
              .inferenceConfig(i -> i
                  .service("hugging_face")
                  .serviceSettings(JsonData.fromJson("{\"api_key\":\"hugging-face-access-token\",\"url\":\"url-endpoint\"}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/{task_type}/{jinaai_inference_id}":
    put:
      tags:
      - inference
      summary: Create an JinaAI inference endpoint
      description: |
        Create an inference endpoint to perform an inference task with the `jinaai` service.

        To review the available `rerank` models, refer to <https://jina.ai/reranker>.
        To review the available `embedding` and `text_embedding` models, refer to <https://jina.ai/embeddings/>.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      operationId: inference-put-jinaai
      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.JinaAITaskType"
        style: simple
      - in: path
        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:
        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.
                    Applies only to the `embedding` and text_embedding` task types.
                    Not 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, `jinaai`.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.JinaAIServiceType"
                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.
                    These settings are specific to the task type you specified.
                  allOf:
                  - "$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: |-
                  {
                      "service": "jinaai",
                      "service_settings": {
                          "model_id": "jina-embeddings-v3",
                          "api_key": "JinaAi-Api-key"
                      }
                  }
              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: |-
                  {
                      "service": "jinaai",
                      "service_settings": {
                          "api_key": "JinaAI-Api-key",
                          "model_id": "jina-reranker-v2-base-multilingual"
                      },
                      "task_settings": {
                          "top_n": 10,
                          "return_documents": true
                      }
                  }
              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: |-
                  {
                      "service": "jinaai",
                      "service_settings": {
                          "model_id": "jina-embeddings-v4",
                          "api_key": "JinaAi-Api-key"
                      }
                  }
              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: |-
                  {
                      "service": "jinaai",
                      "service_settings": {
                          "model_id": "jina-embeddings-v3",
                          "api_key": "JinaAi-Api-key",
                          "multimodal_model": false
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoJinaAi"
              examples:
                PutJinaAiResponseExample1:
                  summary: A text embedding task
                  description: A successful response when creating a JinaAI `text_embedding`
                    inference endpoint.
                  value: |-
                    {
                       "inference_id": "jinaai-embeddings",
                       "task_type": "text_embedding",
                       "service": "jinaai",
                       "service_settings": {
                           "model_id": "jina-embeddings-v3",
                           "rate_limit": {
                               "requests_per_minute": 2000
                           },
                           "dimensions": 1024,
                           "embedding_type": "float",
                           "similarity": "dot_product"
                       },
                       "chunking_settings": {
                           "strategy": "sentence",
                           "max_chunk_size": 250,
                           "sentence_overlap": 1
                       }
                    }
                PutJinaAiResponseExample2:
                  summary: A rerank task
                  description: A successful response when creating a JinaAI `rerank`
                    inference endpoint.
                  value: |-
                    {
                      "inference_id": "jinaai-rerank",
                      "task_type": "rerank",
                      "service": "jinaai",
                      "service_settings": {
                        "model_id": "jina-reranker-v2-base-multilingual",
                        "rate_limit": {
                          "requests_per_minute": 2000
                        }
                      },
                      "task_settings": {
                        "top_n": 10,
                        "return_documents": true
                      }
                    }
                PutJinaAiResponseExample3:
                  summary: An embedding task using a multimodal model
                  description: A successful response when creating a JinaAI `embedding`
                    inference endpoint.
                  value: |-
                    {
                      "inference_id": "jinaai-embeddings-multimodal",
                      "task_type": "embedding",
                      "service": "jinaai",
                      "service_settings": {
                        "model_id": "jina-embeddings-v4",
                        "rate_limit": {
                          "requests_per_minute": 2000
                        },
                        "dimensions": 2048,
                        "embedding_type": "float",
                        "similarity": "dot_product",
                        "multimodal_model": true
                      },
                      "chunking_settings": {
                        "strategy": "sentence",
                        "max_chunk_size": 250,
                        "sentence_overlap": 1
                      }
                    }
                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: |-
                    {
                      "inference_id": "jinaai-embeddings-text-only",
                      "task_type": "embedding",
                      "service": "jinaai",
                      "service_settings": {
                        "model_id": "jina-embeddings-v3",
                        "rate_limit": {
                          "requests_per_minute": 2000
                        },
                        "dimensions": 1024,
                        "embedding_type": "float",
                        "similarity": "dot_product",
                        "multimodal_model": false
                      },
                      "chunking_settings": {
                        "strategy": "sentence",
                        "max_chunk_size": 250,
                        "sentence_overlap": 1
                      }
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/text_embedding/jinaai-embeddings
          {
              "service": "jinaai",
              "service_settings": {
                  "model_id": "jina-embeddings-v3",
                  "api_key": "JinaAi-Api-key"
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="text_embedding",
              inference_id="jinaai-embeddings",
              inference_config={
                  "service": "jinaai",
                  "service_settings": {
                      "model_id": "jina-embeddings-v3",
                      "api_key": "JinaAi-Api-key"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "text_embedding",
            inference_id: "jinaai-embeddings",
            inference_config: {
              service: "jinaai",
              service_settings: {
                model_id: "jina-embeddings-v3",
                api_key: "JinaAi-Api-key",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "text_embedding",
            inference_id: "jinaai-embeddings",
            body: {
              "service": "jinaai",
              "service_settings": {
                "model_id": "jina-embeddings-v3",
                "api_key": "JinaAi-Api-key"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "text_embedding",
              "inference_id" => "jinaai-embeddings",
              "body" => [
                  "service" => "jinaai",
                  "service_settings" => [
                      "model_id" => "jina-embeddings-v3",
                      "api_key" => "JinaAi-Api-key",
                  ],
              ],
          ]);
      - 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
              .inferenceId("jinaai-embeddings")
              .taskType(TaskType.TextEmbedding)
              .inferenceConfig(i -> i
                  .service("jinaai")
                  .serviceSettings(JsonData.fromJson("{\"model_id\":\"jina-embeddings-v3\",\"api_key\":\"JinaAi-Api-key\"}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/{task_type}/{llama_inference_id}":
    put:
      tags:
      - inference
      summary: Create a Llama inference endpoint
      description: |
        Create an inference endpoint to perform an inference task with the `llama` service.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      operationId: inference-put-llama
      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.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:
        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.
                    Applies only to the `text_embedding` task type.
                    Not applicable to the `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, `llama`.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.LlamaServiceType"
                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:
              - service
              - service_settings
            examples:
              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}"
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoLlama"
      x-state: Generally available
      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(
              task_type="text_embedding",
              inference_id="llama-text-embedding",
              inference_config={
                  "service": "llama",
                  "service_settings": {
                      "url": "http://localhost:8321/v1/inference/embeddings",
                      "dimensions": 384,
                      "model_id": "all-MiniLM-L6-v2"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "text_embedding",
            inference_id: "llama-text-embedding",
            inference_config: {
              service: "llama",
              service_settings: {
                url: "http://localhost:8321/v1/inference/embeddings",
                dimensions: 384,
                model_id: "all-MiniLM-L6-v2",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "text_embedding",
            inference_id: "llama-text-embedding",
            body: {
              "service": "llama",
              "service_settings": {
                "url": "http://localhost:8321/v1/inference/embeddings",
                "dimensions": 384,
                "model_id": "all-MiniLM-L6-v2"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "text_embedding",
              "inference_id" => "llama-text-embedding",
              "body" => [
                  "service" => "llama",
                  "service_settings" => [
                      "url" => "http://localhost:8321/v1/inference/embeddings",
                      "dimensions" => 384,
                      "model_id" => "all-MiniLM-L6-v2",
                  ],
              ],
          ]);
      - 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
              .inferenceId("llama-text-embedding")
              .taskType(TaskType.TextEmbedding)
              .inferenceConfig(i -> i
                  .service("llama")
                  .serviceSettings(JsonData.fromJson("{\"url\":\"http://localhost:8321/v1/inference/embeddings\",\"dimensions\":384,\"model_id\":\"all-MiniLM-L6-v2\"}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/{task_type}/{mistral_inference_id}":
    put:
      tags:
      - inference
      summary: Create a Mistral inference endpoint
      description: |
        Create an inference endpoint to perform an inference task with the `mistral` service.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      operationId: inference-put-mistral
      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.MistralTaskType"
        style: simple
      - in: path
        name: mistral_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.
                    Applies only to the `text_embedding` task type.
                    Not applicable to the `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, `mistral`.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.MistralServiceType"
                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:
              - 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}"
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoMistral"
      x-state: Generally available
      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(
              task_type="text_embedding",
              inference_id="mistral-embeddings-test",
              inference_config={
                  "service": "mistral",
                  "service_settings": {
                      "api_key": "Mistral-API-Key",
                      "model": "mistral-embed"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "text_embedding",
            inference_id: "mistral-embeddings-test",
            inference_config: {
              service: "mistral",
              service_settings: {
                api_key: "Mistral-API-Key",
                model: "mistral-embed",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "text_embedding",
            inference_id: "mistral-embeddings-test",
            body: {
              "service": "mistral",
              "service_settings": {
                "api_key": "Mistral-API-Key",
                "model": "mistral-embed"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "text_embedding",
              "inference_id" => "mistral-embeddings-test",
              "body" => [
                  "service" => "mistral",
                  "service_settings" => [
                      "api_key" => "Mistral-API-Key",
                      "model" => "mistral-embed",
                  ],
              ],
          ]);
      - 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
              .inferenceId("mistral-embeddings-test")
              .taskType(TaskType.TextEmbedding)
              .inferenceConfig(i -> i
                  .service("mistral")
                  .serviceSettings(JsonData.fromJson("{\"api_key\":\"Mistral-API-Key\",\"model\":\"mistral-embed\"}"))
              )
          );
      x-metaTags:
      - 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.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      operationId: inference-put-nvidia
      parameters:
      - in: path
        name: task_type
        description: |-
          The type of the inference task that the model will perform.
          NOTE: The `chat_completion` task type only supports streaming and only through the _stream API.
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/inference._types.NvidiaTaskType"
        style: simple
      - in: path
        name: nvidia_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.
                    Applies only to the `text_embedding` task type.
                    Not 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.
                    Applies only to the `text_embedding` task type.
                    Not applicable to the `rerank`, `completion`, or `chat_completion` task types.
                    These 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: |-
                  {
                      "service": "nvidia",
                      "service_settings": {
                          "url": "nvidia-embeddings-url",
                          "api_key": "nvidia-embeddings-token",
                          "model_id": "nvidia/llama-3.2-nv-embedqa-1b-v2"
                      }
                  }
              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: |-
                  {
                      "service": "nvidia",
                      "service_settings": {
                          "model_id": "nvidia/llama-3.2-nv-embedqa-1b-v2",
                          "api_key": "nvidia-text-embeddings-token"
                      },
                      "task_settings": {
                          "input_type": "ingest",
                          "truncate": "start"
                      }
                  }
              PutNvidiaRequestExample3:
                summary: A completion task
                description: Run `PUT _inference/completion/nvidia-completion` to
                  create an inference endpoint that performs a `completion` task.
                value: |-
                  {
                      "service": "nvidia",
                      "service_settings": {
                          "url": "nvidia-completion-url",
                          "api_key": "nvidia-completion-token",
                          "model_id": "microsoft/phi-3-mini-128k-instruct"
                      }
                  }
              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: |-
                  {
                      "service": "nvidia",
                      "service_settings": {
                          "api_key": "nvidia-completion-token",
                          "model_id": "microsoft/phi-3-mini-128k-instruct"
                      }
                  }
              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: |-
                  {
                      "service": "nvidia",
                      "service_settings": {
                          "url": "nvidia-chat-completion-url",
                          "api_key": "nvidia-chat-completion-token",
                          "model_id": "microsoft/phi-3-mini-128k-instruct"
                      }
                  }
              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: |-
                  {
                      "service": "nvidia",
                      "service_settings": {
                          "api_key": "nvidia-chat-completion-token",
                          "model_id": "microsoft/phi-3-mini-128k-instruct"
                      }
                  }
              PutNvidiaRequestExample7:
                summary: A rerank task
                description: Run `PUT _inference/rerank/nvidia-rerank` to create an
                  inference endpoint that performs a `rerank` task.
                value: |-
                  {
                      "service": "nvidia",
                      "service_settings": {
                          "url": "nvidia-rerank-url",
                          "api_key": "nvidia-rerank-token",
                          "model_id": "nv-rerank-qa-mistral-4b:1"
                      }
                  }
              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: |-
                  {
                      "service": "nvidia",
                      "service_settings": {
                          "api_key": "nvidia-rerank-token",
                          "model_id": "nv-rerank-qa-mistral-4b:1"
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoNvidia"
              examples:
                PutNvidiaResponseExample1:
                  summary: A text embedding task
                  description: A successful response when creating an Nvidia `text_embedding`
                    inference endpoint.
                  value: |-
                    {
                      "inference_id": "nvidia-text-embedding",
                      "task_type": "text_embedding",
                      "service": "nvidia",
                      "service_settings": {
                        "model_id": "nvidia/llama-3.2-nv-embedqa-1b-v2",
                        "url": "nvidia-embeddings-url",
                        "rate_limit": {
                          "requests_per_minute": 3000
                        },
                        "dimensions": 2048,
                        "similarity": "dot_product"
                      },
                      "chunking_settings": {
                        "strategy": "sentence",
                        "max_chunk_size": 250,
                        "sentence_overlap": 1
                      }
                    }
                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: |-
                    {
                      "inference_id": "nvidia-text-embedding",
                      "task_type": "text_embedding",
                      "service": "nvidia",
                      "service_settings": {
                        "model_id": "nvidia/llama-3.2-nv-embedqa-1b-v2",
                        "rate_limit": {
                          "requests_per_minute": 3000
                        },
                        "dimensions": 2048,
                        "similarity": "dot_product"
                      },
                      "task_settings": {
                        "input_type": "ingest",
                        "truncate": "start"
                      },
                      "chunking_settings": {
                        "strategy": "sentence",
                        "max_chunk_size": 250,
                        "sentence_overlap": 1
                      }
                    }
                PutNvidiaResponseExample3:
                  summary: A completion task
                  description: A successful response when creating an Nvidia `completion`
                    inference endpoint.
                  value: |-
                    {
                      "inference_id": "nvidia-completion",
                      "task_type": "completion",
                      "service": "nvidia",
                      "service_settings": {
                        "model_id": "microsoft/phi-3-mini-128k-instruct",
                        "url": "nvidia-completion-url",
                        "rate_limit": {
                          "requests_per_minute": 3000
                        }
                      }
                    }
                PutNvidiaResponseExample4:
                  summary: A completion task without `url` parameter
                  description: A successful response when creating an Nvidia `completion`
                    inference endpoint without `url` parameter.
                  value: |-
                    {
                      "inference_id": "nvidia-completion",
                      "task_type": "completion",
                      "service": "nvidia",
                      "service_settings": {
                        "model_id": "microsoft/phi-3-mini-128k-instruct",
                        "rate_limit": {
                          "requests_per_minute": 3000
                        }
                      }
                    }
                PutNvidiaResponseExample5:
                  summary: A chat completion task
                  description: A successful response when creating an Nvidia `chat_completion`
                    inference endpoint.
                  value: |-
                    {
                      "inference_id": "nvidia-chat-completion",
                      "task_type": "chat_completion",
                      "service": "nvidia",
                      "service_settings": {
                        "model_id": "microsoft/phi-3-mini-128k-instruct",
                        "url": "nvidia-chat-completion-url",
                        "rate_limit": {
                          "requests_per_minute": 3000
                        }
                      }
                    }
                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: |-
                    {
                      "inference_id": "nvidia-chat-completion",
                      "task_type": "chat_completion",
                      "service": "nvidia",
                      "service_settings": {
                        "model_id": "microsoft/phi-3-mini-128k-instruct",
                        "rate_limit": {
                          "requests_per_minute": 3000
                        }
                      }
                    }
                PutNvidiaResponseExample7:
                  summary: A rerank task
                  description: A successful response when creating an Nvidia `rerank`
                    inference endpoint.
                  value: |-
                    {
                      "inference_id": "nvidia-rerank",
                      "task_type": "rerank",
                      "service": "nvidia",
                      "service_settings": {
                        "model_id": "nv-rerank-qa-mistral-4b:1",
                        "url": "nvidia-rerank-url",
                        "rate_limit": {
                          "requests_per_minute": 3000
                        }
                      }
                    }
                PutNvidiaResponseExample8:
                  summary: A rerank task without `url` parameter
                  description: A successful response when creating an Nvidia `rerank`
                    inference endpoint without `url` parameter.
                  value: |-
                    {
                      "inference_id": "nvidia-rerank",
                      "task_type": "rerank",
                      "service": "nvidia",
                      "service_settings": {
                        "model_id": "nv-rerank-qa-mistral-4b:1",
                        "rate_limit": {
                          "requests_per_minute": 3000
                        }
                      }
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/text_embedding/nvidia-text-embedding
          {
              "service": "nvidia",
              "service_settings": {
                  "url": "nvidia-embeddings-url",
                  "api_key": "nvidia-embeddings-token",
                  "model_id": "nvidia/llama-3.2-nv-embedqa-1b-v2"
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="text_embedding",
              inference_id="nvidia-text-embedding",
              inference_config={
                  "service": "nvidia",
                  "service_settings": {
                      "url": "nvidia-embeddings-url",
                      "api_key": "nvidia-embeddings-token",
                      "model_id": "nvidia/llama-3.2-nv-embedqa-1b-v2"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "text_embedding",
            inference_id: "nvidia-text-embedding",
            inference_config: {
              service: "nvidia",
              service_settings: {
                url: "nvidia-embeddings-url",
                api_key: "nvidia-embeddings-token",
                model_id: "nvidia/llama-3.2-nv-embedqa-1b-v2",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "text_embedding",
            inference_id: "nvidia-text-embedding",
            body: {
              "service": "nvidia",
              "service_settings": {
                "url": "nvidia-embeddings-url",
                "api_key": "nvidia-embeddings-token",
                "model_id": "nvidia/llama-3.2-nv-embedqa-1b-v2"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "text_embedding",
              "inference_id" => "nvidia-text-embedding",
              "body" => [
                  "service" => "nvidia",
                  "service_settings" => [
                      "url" => "nvidia-embeddings-url",
                      "api_key" => "nvidia-embeddings-token",
                      "model_id" => "nvidia/llama-3.2-nv-embedqa-1b-v2",
                  ],
              ],
          ]);
      - 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
              .inferenceId("nvidia-text-embedding")
              .taskType(TaskType.TextEmbedding)
              .inferenceConfig(i -> i
                  .service("nvidia")
                  .serviceSettings(JsonData.fromJson("{\"url\":\"nvidia-embeddings-url\",\"api_key\":\"nvidia-embeddings-token\",\"model_id\":\"nvidia/llama-3.2-nv-embedqa-1b-v2\"}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_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.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      operationId: inference-put-openai
      parameters:
      - in: path
        name: task_type
        description: |-
          The type of the inference task that the model will perform.
          NOTE: The `chat_completion` task type only supports streaming and only through the _stream API.
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/inference._types.OpenAITaskType"
        style: simple
      - in: path
        name: openai_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.
                    Applies only to the `text_embedding` task type.
                    Not applicable to the `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, `openai`.
                  allOf:
                  - "$ref": "#/components/schemas/inference._types.OpenAIServiceType"
                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"
                task_settings:
                  description: |-
                    Settings to configure the inference task.
                    These settings are specific to the task type you specified.
                  allOf:
                  - "$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: |-
                  {
                      "service": "openai",
                      "service_settings": {
                          "api_key": "OpenAI-API-Key",
                          "model_id": "text-embedding-3-small",
                          "dimensions": 128
                      }
                  }
              PutOpenAiRequestExample2:
                summary: A completion task
                description: Run `PUT _inference/completion/openai-completion` to
                  create an inference endpoint to perform a `completion` task type.
                value: |-
                  {
                      "service": "openai",
                      "service_settings": {
                          "api_key": "OpenAI-API-Key",
                          "model_id": "gpt-3.5-turbo"
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoOpenAI"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/text_embedding/openai-embeddings
          {
              "service": "openai",
              "service_settings": {
                  "api_key": "OpenAI-API-Key",
                  "model_id": "text-embedding-3-small",
                  "dimensions": 128
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="text_embedding",
              inference_id="openai-embeddings",
              inference_config={
                  "service": "openai",
                  "service_settings": {
                      "api_key": "OpenAI-API-Key",
                      "model_id": "text-embedding-3-small",
                      "dimensions": 128
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "text_embedding",
            inference_id: "openai-embeddings",
            inference_config: {
              service: "openai",
              service_settings: {
                api_key: "OpenAI-API-Key",
                model_id: "text-embedding-3-small",
                dimensions: 128,
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "text_embedding",
            inference_id: "openai-embeddings",
            body: {
              "service": "openai",
              "service_settings": {
                "api_key": "OpenAI-API-Key",
                "model_id": "text-embedding-3-small",
                "dimensions": 128
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "text_embedding",
              "inference_id" => "openai-embeddings",
              "body" => [
                  "service" => "openai",
                  "service_settings" => [
                      "api_key" => "OpenAI-API-Key",
                      "model_id" => "text-embedding-3-small",
                      "dimensions" => 128,
                  ],
              ],
          ]);
      - 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
              .inferenceId("openai-embeddings")
              .taskType(TaskType.TextEmbedding)
              .inferenceConfig(i -> i
                  .service("openai")
                  .serviceSettings(JsonData.fromJson("{\"api_key\":\"OpenAI-API-Key\",\"model_id\":\"text-embedding-3-small\",\"dimensions\":128}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/{task_type}/{openshiftai_inference_id}":
    put:
      tags:
      - inference
      summary: Create an OpenShift AI inference endpoint
      description: |
        Create an inference endpoint to perform an inference task with the `openshift_ai` service.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      operationId: inference-put-openshift-ai
      parameters:
      - in: path
        name: task_type
        description: |-
          The type of the inference task that the model will perform.
          NOTE: The `chat_completion` task type only supports streaming and only through the _stream API.
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/inference._types.OpenShiftAiTaskType"
        style: simple
      - in: path
        name: openshiftai_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.
                    Applies only to the `text_embedding` task type.
                    Not 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.
                    Applies only to the `rerank` task type.
                    Not applicable to the `text_embedding`, `completion`, or `chat_completion` task types.
                    These 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: |-
                  {
                      "service": "openshift_ai",
                      "service_settings": {
                          "url": "openshift-ai-embeddings-url",
                          "api_key": "openshift-ai-embeddings-token",
                          "model_id": "gritlm-7b"
                      }
                  }
              PutOpenShiftAiRequestExample2:
                summary: A completion task
                description: Run `PUT _inference/completion/openshift-ai-completion`
                  to create an inference endpoint that performs a `completion` task.
                value: |-
                  {
                      "service": "openshift_ai",
                      "service_settings": {
                          "url": "openshift-ai-completion-url",
                          "api_key": "openshift-ai-completion-token",
                          "model_id": "llama-31-8b-instruct"
                      }
                  }
              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: |-
                  {
                      "service": "openshift_ai",
                      "service_settings": {
                          "url": "openshift-ai-chat-completion-url",
                          "api_key": "openshift-ai-chat-completion-token",
                          "model_id": "llama-31-8b-instruct"
                      }
                  }
              PutOpenShiftAiRequestExample4:
                summary: A rerank task
                description: Run `PUT _inference/rerank/openshift-ai-rerank` to create
                  an inference endpoint that performs a `rerank` task.
                value: |-
                  {
                      "service": "openshift_ai",
                      "service_settings": {
                          "url": "openshift-ai-rerank-url",
                          "api_key": "openshift-ai-rerank-token",
                          "model_id": "bge-reranker-v2-m3"
                      }
                  }
              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: |-
                  {
                      "service": "openshift_ai",
                      "service_settings": {
                          "url": "openshift-ai-rerank-url",
                          "api_key": "openshift-ai-rerank-token"
                      },
                      "task_settings": {
                          "return_documents": true,
                          "top_n": 2
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$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: |-
                    {
                      "inference_id": "openshift-ai-text-embedding",
                      "task_type": "text_embedding",
                      "service": "openshift_ai",
                      "service_settings": {
                        "model_id": "gritlm-7b",
                        "url": "openshift-ai-embeddings-url",
                        "rate_limit": {
                          "requests_per_minute": 3000
                        },
                        "dimensions": 4096,
                        "similarity": "dot_product",
                        "dimensions_set_by_user": false
                      },
                      "chunking_settings": {
                        "strategy": "sentence",
                        "max_chunk_size": 250,
                        "sentence_overlap": 1
                      }
                    }
                PutOpenShiftAiResponseExample2:
                  summary: A completion task
                  description: A successful response when creating an OpenShift AI
                    `completion` inference endpoint.
                  value: |-
                    {
                      "inference_id": "openshift-ai-completion",
                      "task_type": "completion",
                      "service": "openshift_ai",
                      "service_settings": {
                        "model_id": "llama-31-8b-instruct",
                        "url": "openshift-ai-completion-url",
                        "rate_limit": {
                          "requests_per_minute": 3000
                        }
                      }
                    }
                PutOpenShiftAiResponseExample3:
                  summary: A chat completion task
                  description: A successful response when creating an OpenShift AI
                    `chat_completion` inference endpoint.
                  value: |-
                    {
                      "inference_id": "openshift-ai-chat-completion",
                      "task_type": "chat_completion",
                      "service": "openshift_ai",
                      "service_settings": {
                        "model_id": "llama-31-8b-instruct",
                        "url": "openshift-ai-chat-completion-url",
                        "rate_limit": {
                          "requests_per_minute": 3000
                        }
                      }
                    }
                PutOpenShiftAiResponseExample4:
                  summary: A rerank task
                  description: A successful response when creating an OpenShift AI
                    `rerank` inference endpoint.
                  value: |-
                    {
                      "inference_id": "openshift-ai-rerank",
                      "task_type": "rerank",
                      "service": "openshift_ai",
                      "service_settings": {
                        "model_id": "bge-reranker-v2-m3",
                        "url": "openshift-ai-rerank-url",
                        "rate_limit": {
                          "requests_per_minute": 3000
                        }
                      }
                    }
                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: |-
                    {
                      "inference_id": "openshift-ai-rerank",
                      "task_type": "rerank",
                      "service": "openshift_ai",
                      "service_settings": {
                        "url": "openshift-ai-rerank-url",
                        "rate_limit": {
                          "requests_per_minute": 3000
                        }
                      },
                      "task_settings": {
                        "return_documents": true,
                        "top_n": 2
                      }
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/text_embedding/openshift-ai-text-embedding
          {
              "service": "openshift_ai",
              "service_settings": {
                  "url": "openshift-ai-embeddings-url",
                  "api_key": "openshift-ai-embeddings-token",
                  "model_id": "gritlm-7b"
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="text_embedding",
              inference_id="openshift-ai-text-embedding",
              inference_config={
                  "service": "openshift_ai",
                  "service_settings": {
                      "url": "openshift-ai-embeddings-url",
                      "api_key": "openshift-ai-embeddings-token",
                      "model_id": "gritlm-7b"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "text_embedding",
            inference_id: "openshift-ai-text-embedding",
            inference_config: {
              service: "openshift_ai",
              service_settings: {
                url: "openshift-ai-embeddings-url",
                api_key: "openshift-ai-embeddings-token",
                model_id: "gritlm-7b",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "text_embedding",
            inference_id: "openshift-ai-text-embedding",
            body: {
              "service": "openshift_ai",
              "service_settings": {
                "url": "openshift-ai-embeddings-url",
                "api_key": "openshift-ai-embeddings-token",
                "model_id": "gritlm-7b"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "text_embedding",
              "inference_id" => "openshift-ai-text-embedding",
              "body" => [
                  "service" => "openshift_ai",
                  "service_settings" => [
                      "url" => "openshift-ai-embeddings-url",
                      "api_key" => "openshift-ai-embeddings-token",
                      "model_id" => "gritlm-7b",
                  ],
              ],
          ]);
      - 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
              .inferenceId("openshift-ai-text-embedding")
              .taskType(TaskType.TextEmbedding)
              .inferenceConfig(i -> i
                  .service("openshift_ai")
                  .serviceSettings(JsonData.fromJson("{\"url\":\"openshift-ai-embeddings-url\",\"api_key\":\"openshift-ai-embeddings-token\",\"model_id\":\"gritlm-7b\"}"))
              )
          );
      x-metaTags:
      - 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.

        Avoid creating multiple endpoints for the same model unless required, as each endpoint consumes significant resources.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      operationId: inference-put-voyageai
      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.VoyageAITaskType"
        style: simple
      - 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
      - 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.
                    Applies only to the `text_embedding` task type.
                    Not 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.
                    These 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: |-
                  {
                      "service": "voyageai",
                      "service_settings": {
                          "model_id": "voyage-3-large",
                          "dimensions": 512
                      }
                  }
              PutVoyageAIRequestExample2:
                summary: A rerank task
                description: Run `PUT _inference/rerank/voyageai-rerank` to create
                  an inference endpoint that performs a `rerank` task.
                value: |-
                  {
                      "service": "voyageai",
                      "service_settings": {
                          "model_id": "rerank-2"
                      }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/inference._types.InferenceEndpointInfoVoyageAI"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _inference/text_embedding/openai-embeddings
          {
              "service": "voyageai",
              "service_settings": {
                  "model_id": "voyage-3-large",
                  "dimensions": 512
              }
          }
      - lang: Python
        source: |-
          resp = client.inference.put(
              task_type="text_embedding",
              inference_id="openai-embeddings",
              inference_config={
                  "service": "voyageai",
                  "service_settings": {
                      "model_id": "voyage-3-large",
                      "dimensions": 512
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "text_embedding",
            inference_id: "openai-embeddings",
            inference_config: {
              service: "voyageai",
              service_settings: {
                model_id: "voyage-3-large",
                dimensions: 512,
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "text_embedding",
            inference_id: "openai-embeddings",
            body: {
              "service": "voyageai",
              "service_settings": {
                "model_id": "voyage-3-large",
                "dimensions": 512
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "text_embedding",
              "inference_id" => "openai-embeddings",
              "body" => [
                  "service" => "voyageai",
                  "service_settings" => [
                      "model_id" => "voyage-3-large",
                      "dimensions" => 512,
                  ],
              ],
          ]);
      - 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
              .inferenceId("openai-embeddings")
              .taskType(TaskType.TextEmbedding)
              .inferenceConfig(i -> i
                  .service("voyageai")
                  .serviceSettings(JsonData.fromJson("{\"model_id\":\"voyage-3-large\",\"dimensions\":512}"))
              )
          );
      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.
        You need an IBM Cloud Databases for Elasticsearch deployment to use the `watsonxai` inference service.
        You can provision one through the IBM catalog, the Cloud Databases CLI plug-in, the Cloud Databases API, or Terraform.

        ## Required authorization

        * Cluster privileges: `manage_inference`
      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
        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.
                    Applies only to the `text_embedding` task type.
                    Not 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/inference._types.InferenceEndpointInfoWatsonx"
      x-state: Generally available
      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(
              task_type="text_embedding",
              inference_id="watsonx-embeddings",
              inference_config={
                  "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"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.put({
            task_type: "text_embedding",
            inference_id: "watsonx-embeddings",
            inference_config: {
              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",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.inference.put(
            task_type: "text_embedding",
            inference_id: "watsonx-embeddings",
            body: {
              "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"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->put([
              "task_type" => "text_embedding",
              "inference_id" => "watsonx-embeddings",
              "body" => [
                  "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",
                  ],
              ],
          ]);
      - 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
              .inferenceId("watsonx-embeddings")
              .taskType(TaskType.TextEmbedding)
              .inferenceConfig(i -> i
                  .service("watsonxai")
                  .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\"}"))
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/rerank/{inference_id}":
    post:
      tags:
      - inference
      summary: Perform reranking inference on the service
      description: |2


        ## Required authorization

        * Cluster privileges: `monitor_inference`
      operationId: inference-rerank
      parameters:
      - 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
      - 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: 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.
                    These 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: |-
                  {
                    "input": ["luke", "like", "leia", "chewy","r2d2", "star", "wars"],
                    "query": "star wars main character"
                  }
              RerankRequestExample2:
                summary: Rerank task
                description: Run `POST _inference/rerank/bge-reranker-base-mkn` to
                  perform reranking on the example input via Hugging Face
                value: |-
                  {
                    "input": ["luke", "like", "leia", "chewy","r2d2", "star", "wars"],
                    "query": "star wars main character",
                    "return_documents": false,
                    "top_n": 2
                  }
              RerankRequestExample3:
                summary: Rerank task
                description: Run `POST _inference/rerank/bge-reranker-base-mkn` to
                  perform reranking on the example input via Hugging Face
                value: |-
                  {
                    "input": ["luke", "like", "leia", "chewy","r2d2", "star", "wars"],
                    "query": "star wars main character",
                    "return_documents": true,
                    "top_n": 3
                  }
        required: true
      responses:
        '200':
          description: ''
          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`.

                    '
                  value: |-
                    {
                      "rerank": [
                        {
                          "index": "2",
                          "relevance_score": "0.011597361",
                          "text": "leia"
                        },
                        {
                          "index": "0",
                          "relevance_score": "0.006338922",
                          "text": "luke"
                        },
                        {
                          "index": "5",
                          "relevance_score": "0.0016166499",
                          "text": "star"
                        },
                        {
                          "index": "4",
                          "relevance_score": "0.0011695103",
                          "text": "r2d2"
                        },
                        {
                          "index": "1",
                          "relevance_score": "5.614787E-4",
                          "text": "like"
                        },
                        {
                          "index": "6",
                          "relevance_score": "3.7850367E-4",
                          "text": "wars"
                        },
                        {
                          "index": "3",
                          "relevance_score": "1.2508839E-5",
                          "text": "chewy"
                        }
                      ]
                    }
                RerankResponseExample2:
                  summary: Rerank task
                  description: 'A successful response from `POST _inference/rerank/bge-reranker-base-mkn`.

                    '
                  value: |-
                    {
                      "rerank": [
                        {
                          "index": 6,
                          "relevance_score": 0.50955844
                        },
                        {
                          "index": 5,
                          "relevance_score": 0.084341794
                        }
                      ]
                    }
                RerankResponseExample3:
                  summary: Rerank task
                  description: 'A successful response from `POST _inference/rerank/bge-reranker-base-mkn`.

                    '
                  value: |-
                    {
                      "rerank": [
                        {
                          "index": 6,
                          "relevance_score": 0.50955844,
                          "text": "wars"
                        },
                        {
                          "index": 5,
                          "relevance_score": 0.084341794,
                          "text": "star"
                        },
                        {
                          "index": 3,
                          "relevance_score": 0.004520818,
                          "text": "chewy"
                        }
                      ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _inference/rerank/cohere_rerank
          {
            "input": ["luke", "like", "leia", "chewy","r2d2", "star", "wars"],
            "query": "star wars main character"
          }
      - lang: Python
        source: |-
          resp = client.inference.rerank(
              inference_id="cohere_rerank",
              input=[
                  "luke",
                  "like",
                  "leia",
                  "chewy",
                  "r2d2",
                  "star",
                  "wars"
              ],
              query="star wars main character",
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.rerank({
            inference_id: "cohere_rerank",
            input: ["luke", "like", "leia", "chewy", "r2d2", "star", "wars"],
            query: "star wars main character",
          });
      - lang: Ruby
        source: |-
          response = client.inference.rerank(
            inference_id: "cohere_rerank",
            body: {
              "input": [
                "luke",
                "like",
                "leia",
                "chewy",
                "r2d2",
                "star",
                "wars"
              ],
              "query": "star wars main character"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->rerank([
              "inference_id" => "cohere_rerank",
              "body" => [
                  "input" => array(
                      "luke",
                      "like",
                      "leia",
                      "chewy",
                      "r2d2",
                      "star",
                      "wars",
                  ),
                  "query" => "star wars main character",
              ],
          ]);
      - 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
              .inferenceId("cohere_rerank")
              .input(List.of("luke","like","leia","chewy","r2d2","star","wars"))
              .query("star wars main character")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/sparse_embedding/{inference_id}":
    post:
      tags:
      - inference
      summary: Perform sparse embedding inference on the service
      operationId: inference-sparse-embedding
      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.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Duration"
        style: form
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                input:
                  description: |-
                    Inference input.
                    Either 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 <task_type> 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: |-
                  {
                    "input": "The sky above the port was the color of television tuned to a dead channel."
                  }
        required: true
      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`.

                    '
                  value: |-
                    {
                      "sparse_embedding": [
                        {
                          "is_truncated": false,
                          "embedding": {
                            "port": 2.1259406,
                            "sky": 1.7073475,
                            "color": 1.6922266,
                            "dead": 1.6247464,
                            "television": 1.3525393,
                            "above": 1.2425821,
                            "tuned": 1.1440028,
                            "colors": 1.1218185,
                            "tv": 1.0111054,
                            "ports": 1.0067928,
                            "poem": 1.0042328,
                            "channel": 0.99471164,
                            "tune": 0.96235967,
                            "scene": 0.9020516
                          }
                        }
                      ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _inference/sparse_embedding/my-elser-model
          {
            "input": "The sky above the port was the color of television tuned to a dead channel."
          }
      - lang: Python
        source: |-
          resp = client.inference.sparse_embedding(
              inference_id="my-elser-model",
              input="The sky above the port was the color of television tuned to a dead channel.",
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.sparseEmbedding({
            inference_id: "my-elser-model",
            input:
              "The sky above the port was the color of television tuned to a dead channel.",
          });
      - lang: Ruby
        source: |-
          response = client.inference.sparse_embedding(
            inference_id: "my-elser-model",
            body: {
              "input": "The sky above the port was the color of television tuned to a dead channel."
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->sparseEmbedding([
              "inference_id" => "my-elser-model",
              "body" => [
                  "input" => "The sky above the port was the color of television tuned to a dead channel.",
              ],
          ]);
      - 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
              .inferenceId("my-elser-model")
              .input("The sky above the port was the color of television tuned to a dead channel.")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_inference/text_embedding/{inference_id}":
    post:
      tags:
      - inference
      summary: Perform text embedding inference on the service
      operationId: inference-text-embedding
      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.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Duration"
        style: form
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                input:
                  description: |-
                    Inference input.
                    Either 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:
                    * `SEARCH`
                    * `INGEST`
                    * `CLASSIFICATION`
                    * `CLUSTERING`
                    Not all services support all values. Unsupported values will trigger a validation exception.
                    Accepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.

                    > info
                    > 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 <task_type> 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: |-
                  {
                    "input": "The sky above the port was the color of television tuned to a dead channel.",
                    "input_type": "ingest"
                  }
        required: true
      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-text-embedding-endpoint`.

                    '
                  value: |-
                    {
                      "text_embedding": [
                        {
                          "embedding": [
                            0.018569946,
                            -0.036895752,
                            0.01486969,
                            -0.0045204163,
                            -0.04385376,
                            0.0075950623,
                            0.04260254,
                            -0.004005432,
                            0.007865906,
                            0.030792236,
                            -0.050476074,
                            0.011795044,
                            -0.011642456,
                            -0.010070801
                          ]
                        }
                      ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _inference/text_embedding/my-cohere-endpoint
          {
            "input": "The sky above the port was the color of television tuned to a dead channel.",
            "input_type": "ingest"
          }
      - lang: Python
        source: |-
          resp = client.inference.text_embedding(
              inference_id="my-cohere-endpoint",
              input="The sky above the port was the color of television tuned to a dead channel.",
              input_type="ingest",
          )
      - lang: JavaScript
        source: |-
          const response = await client.inference.textEmbedding({
            inference_id: "my-cohere-endpoint",
            input:
              "The sky above the port was the color of television tuned to a dead channel.",
            input_type: "ingest",
          });
      - lang: Ruby
        source: |-
          response = client.inference.text_embedding(
            inference_id: "my-cohere-endpoint",
            body: {
              "input": "The sky above the port was the color of television tuned to a dead channel.",
              "input_type": "ingest"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->inference()->textEmbedding([
              "inference_id" => "my-cohere-endpoint",
              "body" => [
                  "input" => "The sky above the port was the color of television tuned to a dead channel.",
                  "input_type" => "ingest",
              ],
          ]);
      - 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
              .inferenceId("my-cohere-endpoint")
              .input("The sky above the port was the color of television tuned to a dead channel.")
              .inputType("ingest")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/":
    get:
      tags:
      - info
      summary: Get cluster info
      description: |
        Get basic build, version, and cluster information.
        ::: In Serverless, this API is retained for backward compatibility only. Some response fields, such as the version number, should be ignored.

        ## Required authorization

        * Cluster privileges: `monitor`
      operationId: info
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  cluster_name:
                    description: The responding cluster's name.
                    allOf:
                    - "$ref": "#/components/schemas/_types.Name"
                  cluster_uuid:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Uuid"
                  name:
                    description: The responding node's name.
                    allOf:
                    - "$ref": "#/components/schemas/_types.Name"
                  tagline:
                    type: string
                  version:
                    description: The running version of Elasticsearch.
                    allOf:
                    - "$ref": "#/components/schemas/_types.ElasticsearchVersionInfo"
                required:
                - cluster_name
                - cluster_uuid
                - name
                - tagline
                - version
              examples:
                RootNodeInfoResponseExample1:
                  summary: Stack response
                  description: A successful response from `GET /`.
                  value: |-
                    {
                      "name": "instance-0000000000",
                      "cluster_name": "my_test_cluster",
                      "cluster_uuid": "zk-HjQtYQGyL3NFSSu7InA",
                      "version": {
                        "number": "9.1.0",
                        "build_flavor": "default",
                        "build_type": "docker",
                        "build_hash": 0,
                        "build_date": "2025-07-09T22:10:13.578Z",
                        "build_snapshot": false,
                        "lucene_version": "10.2.2",
                        "minimum_wire_compatibility_version": "8.19.0",
                        "minimum_index_compatibility_version": "8.0.0"
                      },
                      "tagline": "You Know, for Search"
                    }
                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: |-
                    {
                      "name": "serverless",
                      "cluster_name": "my_test_serverless_cluster",
                      "cluster_uuid": "8xx0pi24Squnf4PFDOAtwg",
                      "version": {
                        "number": "8.11.0",
                        "build_flavor": "serverless",
                        "build_type": "docker",
                        "build_hash": 0,
                        "build_date": "2023-10-31T00:00:00.000Z",
                        "build_snapshot": false,
                        "lucene_version": "9.7.0",
                        "minimum_wire_compatibility_version": "8.11.0",
                        "minimum_index_compatibility_version": "8.11.0"
                      },
                      "tagline": "You Know, for Search"
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /

          '
      - 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();

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    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-state: Generally available
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_ingest/pipeline/{id}":
    get:
      tags:
      - ingest
      summary: 'Get pipelines

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ingest/pipeline</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ingest/pipeline/{id}</span>\n
        \                     </div>\n                    \n\nGet 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
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/get-pipeline-api.html
      operationId: ingest-get-pipeline
      parameters:
      - "$ref": "#/components/parameters/ingest.get_pipeline-id"
      - "$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: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_ingest/pipeline/my-pipeline-id

          '
      - lang: Python
        source: |-
          resp = client.ingest.get_pipeline(
              id="my-pipeline-id",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ingest.getPipeline({
            id: "my-pipeline-id",
          });
      - lang: Ruby
        source: |-
          response = client.ingest.get_pipeline(
            id: "my-pipeline-id"
          )
      - lang: PHP
        source: |-
          $resp = $client->ingest()->getPipeline([
              "id" => "my-pipeline-id",
          ]);
      - 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
              .id("my-pipeline-id")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    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: path
        name: id
        description: ID of the ingest pipeline to create or update.
        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. 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
      - in: query
        name: if_version
        description: Required version for optimistic concurrency control for pipeline
          updates
        deprecated: false
        schema:
          type: number
        style: form
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                _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:
                    "$ref": "#/components/schemas/ingest._types.ProcessorContainer"
                processors:
                  description: Processors used to perform transformations on documents
                    before indexing. Processors run sequentially in the order specified.
                  type: array
                  items:
                    "$ref": "#/components/schemas/ingest._types.ProcessorContainer"
                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"
                deprecated:
                  description: |-
                    Marks this ingest pipeline as deprecated.
                    When 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
                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
                  allOf:
                  - "$ref": "#/components/schemas/ingest._types.FieldAccessPattern"
            examples:
              PutPipelineRequestExample1:
                summary: Create an ingest pipeline.
                value: |-
                  {
                    "description" : "My optional pipeline description",
                    "processors" : [
                      {
                        "set" : {
                          "description" : "My optional processor description",
                          "field": "my-keyword-field",
                          "value": "foo"
                        }
                      }
                    ]
                  }
              PutPipelineRequestExample2:
                summary: Create an ingest pipeline with metadata.
                description: You can use the `_meta` parameter to add arbitrary metadata
                  to a pipeline.
                value: |-
                  {
                    "description" : "My optional pipeline description",
                    "processors" : [
                      {
                        "set" : {
                          "description" : "My optional processor description",
                          "field": "my-keyword-field",
                          "value": "foo"
                        }
                      }
                    ],
                    "_meta": {
                      "reason": "set my-keyword-field to foo",
                      "serialization": {
                        "class": "MyPipeline",
                        "id": 10
                      }
                    }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _ingest/pipeline/my-pipeline-id
          {
            "description" : "My optional pipeline description",
            "processors" : [
              {
                "set" : {
                  "description" : "My optional processor description",
                  "field": "my-keyword-field",
                  "value": "foo"
                }
              }
            ]
          }
      - lang: Python
        source: |-
          resp = client.ingest.put_pipeline(
              id="my-pipeline-id",
              description="My optional pipeline description",
              processors=[
                  {
                      "set": {
                          "description": "My optional processor description",
                          "field": "my-keyword-field",
                          "value": "foo"
                      }
                  }
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.ingest.putPipeline({
            id: "my-pipeline-id",
            description: "My optional pipeline description",
            processors: [
              {
                set: {
                  description: "My optional processor description",
                  field: "my-keyword-field",
                  value: "foo",
                },
              },
            ],
          });
      - lang: Ruby
        source: |-
          response = client.ingest.put_pipeline(
            id: "my-pipeline-id",
            body: {
              "description": "My optional pipeline description",
              "processors": [
                {
                  "set": {
                    "description": "My optional processor description",
                    "field": "my-keyword-field",
                    "value": "foo"
                  }
                }
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ingest()->putPipeline([
              "id" => "my-pipeline-id",
              "body" => [
                  "description" => "My optional pipeline description",
                  "processors" => array(
                      [
                          "set" => [
                              "description" => "My optional processor description",
                              "field" => "my-keyword-field",
                              "value" => "foo",
                          ],
                      ],
                  ),
              ],
          ]);
      - 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
              .description("My optional pipeline description")
              .id("my-pipeline-id")
              .processors(pr -> pr
                  .set(s -> s
                      .field("my-keyword-field")
                      .value(JsonData.fromJson("\"foo\""))
                      .description("My optional processor description")
                  )
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - ingest
      summary: Delete pipelines
      description: Delete one or more ingest pipelines.
      externalDocs:
        url: https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/delete-pipeline-api.html
      operationId: ingest-delete-pipeline
      parameters:
      - in: path
        name: id
        description: |-
          Pipeline ID or wildcard expression of pipeline IDs used to limit the request.
          To delete all ingest pipelines in a cluster, use a value of `*`.
        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.
          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
      x-codeSamples:
      - lang: Console
        source: 'DELETE /_ingest/pipeline/my-pipeline-id

          '
      - lang: Python
        source: |-
          resp = client.ingest.delete_pipeline(
              id="my-pipeline-id",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ingest.deletePipeline({
            id: "my-pipeline-id",
          });
      - lang: Ruby
        source: |-
          response = client.ingest.delete_pipeline(
            id: "my-pipeline-id"
          )
      - lang: PHP
        source: |-
          $resp = $client->ingest()->deletePipeline([
              "id" => "my-pipeline-id",
          ]);
      - 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
              .id("my-pipeline-id")
          );
      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.
        You must choose which field to extract matched fields from, as well as the grok pattern you expect will match.
        A 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: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _ingest/processor/grok

          '
      - 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();

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_ingest/pipeline/{id}/_simulate":
    post:
      tags:
      - ingest
      summary: 'Simulate a pipeline

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ingest/pipeline/_simulate</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_ingest/pipeline/_simulate</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ingest/pipeline/{id}/_simulate</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_ingest/pipeline/{id}/_simulate</span>\n
        \                     </div>\n                    \n\nRun 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.\n\n## Required authorization\n\n* Cluster privileges:
        `read_pipeline`\n"
      operationId: ingest-simulate
      parameters:
      - "$ref": "#/components/parameters/ingest.simulate-id"
      - "$ref": "#/components/parameters/ingest.simulate-verbose"
      requestBody:
        "$ref": "#/components/requestBodies/ingest.simulate"
      responses:
        '200':
          "$ref": "#/components/responses/ingest.simulate-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST /_ingest/pipeline/_simulate
          {
            "pipeline" :
            {
              "description": "_description",
              "processors": [
                {
                  "set" : {
                    "field" : "field2",
                    "value" : "_value"
                  }
                }
              ]
            },
            "docs": [
              {
                "_index": "index",
                "_id": "id",
                "_source": {
                  "foo": "bar"
                }
              },
              {
                "_index": "index",
                "_id": "id",
                "_source": {
                  "foo": "rab"
                }
              }
            ]
          }
      - lang: Python
        source: |-
          resp = client.ingest.simulate(
              pipeline={
                  "description": "_description",
                  "processors": [
                      {
                          "set": {
                              "field": "field2",
                              "value": "_value"
                          }
                      }
                  ]
              },
              docs=[
                  {
                      "_index": "index",
                      "_id": "id",
                      "_source": {
                          "foo": "bar"
                      }
                  },
                  {
                      "_index": "index",
                      "_id": "id",
                      "_source": {
                          "foo": "rab"
                      }
                  }
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.ingest.simulate({
            pipeline: {
              description: "_description",
              processors: [
                {
                  set: {
                    field: "field2",
                    value: "_value",
                  },
                },
              ],
            },
            docs: [
              {
                _index: "index",
                _id: "id",
                _source: {
                  foo: "bar",
                },
              },
              {
                _index: "index",
                _id: "id",
                _source: {
                  foo: "rab",
                },
              },
            ],
          });
      - lang: Ruby
        source: |-
          response = client.ingest.simulate(
            body: {
              "pipeline": {
                "description": "_description",
                "processors": [
                  {
                    "set": {
                      "field": "field2",
                      "value": "_value"
                    }
                  }
                ]
              },
              "docs": [
                {
                  "_index": "index",
                  "_id": "id",
                  "_source": {
                    "foo": "bar"
                  }
                },
                {
                  "_index": "index",
                  "_id": "id",
                  "_source": {
                    "foo": "rab"
                  }
                }
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ingest()->simulate([
              "body" => [
                  "pipeline" => [
                      "description" => "_description",
                      "processors" => array(
                          [
                              "set" => [
                                  "field" => "field2",
                                  "value" => "_value",
                              ],
                          ],
                      ),
                  ],
                  "docs" => array(
                      [
                          "_index" => "index",
                          "_id" => "id",
                          "_source" => [
                              "foo" => "bar",
                          ],
                      ],
                      [
                          "_index" => "index",
                          "_id" => "id",
                          "_source" => [
                              "foo" => "rab",
                          ],
                      ],
                  ),
              ],
          ]);
      - 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
              .docs(List.of(Document.of(d -> d
                      .id("id")
                      .index("index")
                      .source(JsonData.fromJson("{\"foo\":\"bar\"}"))
                  ),Document.of(d -> d
                      .id("id")
                      .index("index")
                      .source(JsonData.fromJson("{\"foo\":\"rab\"}"))
                  )))
              .pipeline(p -> p
                  .description("_description")
                  .processors(pr -> pr
                      .set(se -> se
                          .field("field2")
                          .value(JsonData.fromJson("\"_value\""))
                      )
                  )
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_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.

        >info
        > If the master node is generating a new cluster state, the get license API may return a `404 Not Found` response.
        > 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: 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.
          This parameter is deprecated and will always be set to true in 8.x.
        deprecated: true
        schema:
          type: boolean
        style: form
      - in: query
        name: local
        description: |-
          Specifies whether to retrieve local information.
          From 9.2 onwards the default value is `true`, which means the information is retrieved from the responding node.
          In earlier versions the default is `false`, which means the information is retrieved from the elected master node.
        deprecated: false
        schema:
          type: boolean
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  license:
                    allOf:
                    - "$ref": "#/components/schemas/license.get.LicenseInformation"
                required:
                - license
              examples:
                GetLicenseResponseExample1:
                  description: A successful response from `GET /_license`.
                  value: |-
                    {
                      "license" : {
                        "status" : "active",
                        "uid" : "cbff45e7-c553-41f7-ae4f-9205eabd80xx",
                        "type" : "trial",
                        "issue_date" : "2018-10-20T22:05:12.332Z",
                        "issue_date_in_millis" : 1540073112332,
                        "expiry_date" : "2018-11-19T22:05:12.332Z",
                        "expiry_date_in_millis" : 1542665112332,
                        "max_nodes" : 1000,
                        "max_resource_units" : null,
                        "issued_to" : "test",
                        "issuer" : "elasticsearch",
                        "start_date_in_millis" : -1
                      }
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_license

          '
      - 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);

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_logstash/pipeline/{id}":
    get:
      tags:
      - logstash
      summary: 'Get Logstash pipelines

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_logstash/pipeline</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_logstash/pipeline/{id}</span>\n
        \                     </div>\n                    \n\nGet pipelines that are
        used for Logstash Central Management.\n\n## Required authorization\n\n* Cluster
        privileges: `manage_logstash_pipelines`\n"
      externalDocs:
        url: https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/logstash-api-get-pipeline.html
      operationId: logstash-get-pipeline
      parameters:
      - "$ref": "#/components/parameters/logstash.get_pipeline-id"
      responses:
        '200':
          "$ref": "#/components/responses/logstash.get_pipeline-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _logstash/pipeline/my_pipeline

          '
      - lang: Python
        source: |-
          resp = client.logstash.get_pipeline(
              id="my_pipeline",
          )
      - lang: JavaScript
        source: |-
          const response = await client.logstash.getPipeline({
            id: "my_pipeline",
          });
      - lang: Ruby
        source: |-
          response = client.logstash.get_pipeline(
            id: "my_pipeline"
          )
      - lang: PHP
        source: |-
          $resp = $client->logstash()->getPipeline([
              "id" => "my_pipeline",
          ]);
      - 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
              .id("my_pipeline")
          );
      x-metaTags:
      - content: Elasticsearch, Logstash
        name: product_name
    put:
      tags:
      - logstash
      summary: Create or update a Logstash pipeline
      description: |
        Create a pipeline that is used for Logstash Central Management.
        If the specified pipeline exists, it is replaced.

        ## Required authorization

        * Cluster privileges: `manage_logstash_pipelines`
      externalDocs:
        url: https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/logstash-api-put-pipeline.html
      operationId: logstash-put-pipeline
      parameters:
      - in: path
        name: id
        description: |-
          An identifier for the pipeline.
          Pipeline 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:
        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: |-
                  {
                    "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
                    }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json: {}
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _logstash/pipeline/my_pipeline
          {
            "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
            }
          }
      - lang: Python
        source: |-
          resp = client.logstash.put_pipeline(
              id="my_pipeline",
              pipeline={
                  "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
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.logstash.putPipeline({
            id: "my_pipeline",
            pipeline: {
              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,
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.logstash.put_pipeline(
            id: "my_pipeline",
            body: {
              "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
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->logstash()->putPipeline([
              "id" => "my_pipeline",
              "body" => [
                  "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,
                  ],
              ],
          ]);
      - 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
              .id("my_pipeline")
              .pipeline(pi -> pi
                  .description("Sample pipeline for illustration purposes")
                  .lastModified(DateTime.of("2021-01-02T02:50:51.250Z"))
                  .pipeline("input {}\n filter { grok {} }\n output {}")
                  .pipelineMetadata(pip -> pip
                      .type("logstash_pipeline")
                      .version("1")
                  )
                  .pipelineSettings(pip -> pip
                      .pipelineWorkers(1)
                      .pipelineBatchSize(125)
                      .pipelineBatchDelay(50)
                      .queueType("memory")
                      .queueMaxBytes("1gb")
                      .queueCheckpointWrites(1024)
                  )
                  .username("elastic")
              )
          );
      x-metaTags:
      - content: Elasticsearch, Logstash
        name: product_name
    delete:
      tags:
      - logstash
      summary: Delete a Logstash pipeline
      description: |
        Delete a pipeline that is used for Logstash Central Management.
        If the request succeeds, you receive an empty response with an appropriate status code.

        ## Required authorization

        * Cluster privileges: `manage_logstash_pipelines`
      externalDocs:
        url: https://www.elastic.co/docs/reference/logstash/logstash-centralized-pipeline-management
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/logstash-api-delete-pipeline.html
      operationId: logstash-delete-pipeline
      parameters:
      - in: path
        name: id
        description: An identifier for the pipeline.
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Id"
        style: simple
      responses:
        '200':
          description: ''
          content:
            application/json: {}
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _logstash/pipeline/my_pipeline

          '
      - lang: Python
        source: |-
          resp = client.logstash.delete_pipeline(
              id="my_pipeline",
          )
      - lang: JavaScript
        source: |-
          const response = await client.logstash.deletePipeline({
            id: "my_pipeline",
          });
      - lang: Ruby
        source: |-
          response = client.logstash.delete_pipeline(
            id: "my_pipeline"
          )
      - lang: PHP
        source: |-
          $resp = $client->logstash()->deletePipeline([
              "id" => "my_pipeline",
          ]);
      - 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
              .id("my_pipeline")
          );
      x-metaTags:
      - content: Elasticsearch, Logstash
        name: product_name
  "/{index}/_mget":
    post:
      tags:
      - document
      summary: 'Get multiple documents

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_mget</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_mget</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_mget</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_mget</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n## Required authorization\n\n* Index
        privileges: `read`\n"
      operationId: mget
      parameters:
      - "$ref": "#/components/parameters/mget-index"
      - "$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: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          GET /my-index-000001/_mget
          {
            "docs": [
              {
                "_id": "1"
              },
              {
                "_id": "2"
              }
            ]
          }
      - lang: Python
        source: |-
          resp = client.mget(
              index="my-index-000001",
              docs=[
                  {
                      "_id": "1"
                  },
                  {
                      "_id": "2"
                  }
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.mget({
            index: "my-index-000001",
            docs: [
              {
                _id: "1",
              },
              {
                _id: "2",
              },
            ],
          });
      - lang: Ruby
        source: |-
          response = client.mget(
            index: "my-index-000001",
            body: {
              "docs": [
                {
                  "_id": "1"
                },
                {
                  "_id": "2"
                }
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->mget([
              "index" => "my-index-000001",
              "body" => [
                  "docs" => array(
                      [
                          "_id" => "1",
                      ],
                      [
                          "_id" => "2",
                      ],
                  ),
              ],
          ]);
      - 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
              .docs(List.of(MultiGetOperation.of(mu -> mu
                      .id("1")
                  ),MultiGetOperation.of(mu -> mu
                      .id("2")
                  )))
              .index("my-index-000001")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_ml/anomaly_detectors/{job_id}/_close":
    post:
      tags:
      - ml anomaly
      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.
        When 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.
        If 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.
        When a datafeed that has a specified end date stops, it automatically closes its associated job.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-close-job
      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.
        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: contains wildcard expressions and there are no jobs that match; contains the  `_all` string or no identifiers and there are no matches; or contains wildcard expressions and there are only partial matches. By default, it returns an empty jobs array when there are no matches and the subset of results when there are partial matches.
          If `false`, the request returns a 404 status code when there are no matches or only partial matches.
        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.
          If you want the job to be in a consistent state after the close job API returns, do not set to `true`. This parameter should be used only in situations where the job has already failed or where you are not interested in results the job might have recently produced or might produce in the future.
        deprecated: false
        schema:
          type: boolean
        style: form
      - in: query
        name: timeout
        description: Controls the time to wait until a job has closed.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Duration"
        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:
                type: object
                properties:
                  closed:
                    type: boolean
                required:
                - closed
              examples:
                MlCloseJobResponseExample1:
                  description: A successful response when closing anomaly detection
                    jobs.
                  value: |-
                    {
                      "closed": true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'POST _ml/anomaly_detectors/low_request_rate/_close

          '
      - lang: Python
        source: |-
          resp = client.ml.close_job(
              job_id="low_request_rate",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.closeJob({
            job_id: "low_request_rate",
          });
      - lang: Ruby
        source: |-
          response = client.ml.close_job(
            job_id: "low_request_rate"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->closeJob([
              "job_id" => "low_request_rate",
          ]);
      - 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
              .jobId("low_request_rate")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/calendars/{calendar_id}":
    put:
      tags:
      - ml anomaly
      summary: Create a calendar
      description: |2


        ## Required authorization

        * Cluster privileges: `manage_ml`
      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
      x-codeSamples:
      - lang: Console
        source: 'PUT _ml/calendars/planned-outages

          '
      - lang: Python
        source: |-
          resp = client.ml.put_calendar(
              calendar_id="planned-outages",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.putCalendar({
            calendar_id: "planned-outages",
          });
      - lang: Ruby
        source: |-
          response = client.ml.put_calendar(
            calendar_id: "planned-outages"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->putCalendar([
              "calendar_id" => "planned-outages",
          ]);
      - 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
              .calendarId("planned-outages")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
    post:
      tags:
      - ml anomaly
      summary: 'Get calendar configuration info

        '
      description: |
        **All methods and paths for this operation:**

        <div>
                              <span class="operation-verb get">GET</span>
                              <span class="operation-path">/_ml/calendars</span>
                              </div>
                            <div>
                              <span class="operation-verb post">POST</span>
                              <span class="operation-path">/_ml/calendars</span>
                              </div>
                            <div>
                              <span class="operation-verb get">GET</span>
                              <span class="operation-path">/_ml/calendars/{calendar_id}</span>
                              </div>
                            <div>
                              <span class="operation-verb post">POST</span>
                              <span class="operation-path">/_ml/calendars/{calendar_id}</span>
                              </div>

        ## Required authorization

        * Cluster privileges: `monitor_ml`
      operationId: ml-get-calendars
      parameters:
      - "$ref": "#/components/parameters/ml.get_calendars-calendar_id"
      - "$ref": "#/components/parameters/ml.get_calendars-from"
      - "$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: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _ml/calendars/planned-outages

          '
      - lang: Python
        source: |-
          resp = client.ml.get_calendars(
              calendar_id="planned-outages",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.getCalendars({
            calendar_id: "planned-outages",
          });
      - lang: Ruby
        source: |-
          response = client.ml.get_calendars(
            calendar_id: "planned-outages"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->getCalendars([
              "calendar_id" => "planned-outages",
          ]);
      - 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
              .calendarId("planned-outages")
          );
      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.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      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:
                MlDeleteCalendarResponseExample1:
                  description: A successful response when deleting a calendar.
                  value: |-
                    {
                      "acknowledged": true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _ml/calendars/planned-outages

          '
      - lang: Python
        source: |-
          resp = client.ml.delete_calendar(
              calendar_id="planned-outages",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.deleteCalendar({
            calendar_id: "planned-outages",
          });
      - lang: Ruby
        source: |-
          response = client.ml.delete_calendar(
            calendar_id: "planned-outages"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->deleteCalendar([
              "calendar_id" => "planned-outages",
          ]);
      - 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
              .calendarId("planned-outages")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/calendars/{calendar_id}/events/{event_id}":
    delete:
      tags:
      - ml anomaly
      summary: Delete events from a calendar
      operationId: ml-delete-calendar-event
      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
      - in: path
        name: event_id
        description: |-
          Identifier for the scheduled event.
          You 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: |-
                    {
                      "acknowledged": true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _ml/calendars/planned-outages/events/LS8LJGEBMTCMA-qz49st

          '
      - lang: Python
        source: |-
          resp = client.ml.delete_calendar_event(
              calendar_id="planned-outages",
              event_id="LS8LJGEBMTCMA-qz49st",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.deleteCalendarEvent({
            calendar_id: "planned-outages",
            event_id: "LS8LJGEBMTCMA-qz49st",
          });
      - lang: Ruby
        source: |-
          response = client.ml.delete_calendar_event(
            calendar_id: "planned-outages",
            event_id: "LS8LJGEBMTCMA-qz49st"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->deleteCalendarEvent([
              "calendar_id" => "planned-outages",
              "event_id" => "LS8LJGEBMTCMA-qz49st",
          ]);
      - 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
              .calendarId("planned-outages")
              .eventId("LS8LJGEBMTCMA-qz49st")
          );
      x-metaTags:
      - 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
      description: |2


        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-put-calendar-job
      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
      - 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:
          "$ref": "#/components/schemas/_types.Ids"
        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
      x-codeSamples:
      - lang: Console
        source: 'PUT _ml/calendars/planned-outages/jobs/total-requests

          '
      - lang: Python
        source: |-
          resp = client.ml.put_calendar_job(
              calendar_id="planned-outages",
              job_id="total-requests",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.putCalendarJob({
            calendar_id: "planned-outages",
            job_id: "total-requests",
          });
      - lang: Ruby
        source: |-
          response = client.ml.put_calendar_job(
            calendar_id: "planned-outages",
            job_id: "total-requests"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->putCalendarJob([
              "calendar_id" => "planned-outages",
              "job_id" => "total-requests",
          ]);
      - 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
              .calendarId("planned-outages")
              .jobId("total-requests")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
    delete:
      tags:
      - ml anomaly
      summary: Delete anomaly jobs from a calendar
      description: |2


        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-delete-calendar-job
      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
      - 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:
          "$ref": "#/components/schemas/_types.Ids"
        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: |-
                    {
                      "calendar_id": "planned-outages",
                      "job_ids": []
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _ml/calendars/planned-outages/jobs/total-requests

          '
      - lang: Python
        source: |-
          resp = client.ml.delete_calendar_job(
              calendar_id="planned-outages",
              job_id="total-requests",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.deleteCalendarJob({
            calendar_id: "planned-outages",
            job_id: "total-requests",
          });
      - lang: Ruby
        source: |-
          response = client.ml.delete_calendar_job(
            calendar_id: "planned-outages",
            job_id: "total-requests"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->deleteCalendarJob([
              "calendar_id" => "planned-outages",
              "job_id" => "total-requests",
          ]);
      - 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
              .calendarId("planned-outages")
              .jobId("total-requests")
          );
      x-metaTags:
      - 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: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/data_frame/analytics</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/data_frame/analytics/{id}</span>\n
        \                     </div>\n                    \n\nYou 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.\n\n##
        Required authorization\n\n* Cluster privileges: `monitor_ml`\n"
      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"
      responses:
        '200':
          "$ref": "#/components/responses/ml.get_data_frame_analytics-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _ml/data_frame/analytics/loganalytics

          '
      - lang: Python
        source: |-
          resp = client.ml.get_data_frame_analytics(
              id="loganalytics",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.getDataFrameAnalytics({
            id: "loganalytics",
          });
      - lang: Ruby
        source: |-
          response = client.ml.get_data_frame_analytics(
            id: "loganalytics"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->getDataFrameAnalytics([
              "id" => "loganalytics",
          ]);
      - 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
              .id("loganalytics")
          );
      x-metaTags:
      - 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
        source indices and stores the outcome in a destination index.
        By default, the query used in the source configuration is `{"match_all": {}}`.

        If the destination index does not exist, it is created automatically when you start the job.

        If you supply only a subset of the regression or classification parameters, hyperparameter optimization occurs. It determines a value for each of the undefined parameters.

        ## Required authorization

        * Index privileges: `create_index`,`index`,`manage`,`read`,`view_index_metadata`
        * Cluster privileges: `manage_ml`
      operationId: ml-put-data-frame-analytics
      parameters:
      - in: path
        name: id
        description: |-
          Identifier for the data frame analytics job. This identifier can contain
          lowercase alphanumeric characters (a-z and 0-9), hyphens, and
          underscores. It must start and end with alphanumeric characters.
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Id"
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                allow_lazy_start:
                  description: |-
                    Specifies whether this job can start when there is insufficient machine
                    learning node capacity for it to be immediately assigned to a node. If
                    set to `false` and a machine learning node with capacity to run the job
                    cannot be immediately found, the API returns an error. If set to `true`,
                    the API does not return an error; the job waits in the `starting` state
                    until sufficient machine learning node capacity is available. This
                    behavior is also affected by the cluster-wide
                    `xpack.ml.max_lazy_ml_nodes` setting.
                  default: false
                  type: boolean
                analysis:
                  description: |-
                    The analysis configuration, which contains the information necessary to
                    perform one of the following types of analysis: classification, outlier
                    detection, or regression.
                  allOf:
                  - "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer"
                analyzed_fields:
                  description: |-
                    Specifies `includes` and/or `excludes` patterns to select which fields
                    will be included in the analysis. The patterns specified in `excludes`
                    are applied last, therefore `excludes` takes precedence. In other words,
                    if the same field is specified in both `includes` and `excludes`, then
                    the field will not be included in the analysis. If `analyzed_fields` is
                    not set, only the relevant fields will be included. For example, all the
                    numeric fields for outlier detection.
                    The supported fields vary for each type of analysis. Outlier detection
                    requires numeric or `boolean` data to analyze. The algorithms don’t
                    support missing values therefore fields that have data types other than
                    numeric or boolean are ignored. Documents where included fields contain
                    missing values, null values, or an array are also ignored. Therefore the
                    `dest` index may contain documents that don’t have an outlier score.
                    Regression supports fields that are numeric, `boolean`, `text`,
                    `keyword`, and `ip` data types. It is also tolerant of missing values.
                    Fields that are supported are included in the analysis, other fields are
                    ignored. Documents where included fields contain an array with two or
                    more values are also ignored. Documents in the `dest` index that don’t
                    contain a results field are not included in the regression analysis.
                    Classification supports fields that are numeric, `boolean`, `text`,
                    `keyword`, and `ip` data types. It is also tolerant of missing values.
                    Fields that are supported are included in the analysis, other fields are
                    ignored. Documents where included fields contain an array with two or
                    more values are also ignored. Documents in the `dest` index that don’t
                    contain a results field are not included in the classification analysis.
                    Classification analysis can be improved by mapping ordinal variable
                    values to a single number. For example, in case of age ranges, you can
                    model the values as `0-14 = 0`, `15-24 = 1`, `25-34 = 2`, and so on.
                  allOf:
                  - "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields"
                description:
                  description: A description of the job.
                  type: string
                dest:
                  description: The destination configuration.
                  allOf:
                  - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsDestination"
                max_num_threads:
                  description: |-
                    The maximum number of threads to be used by the analysis. Using more
                    threads may decrease the time necessary to complete the analysis at the
                    cost of using more CPU. Note that the process may use additional threads
                    for operational functionality other than the analysis itself.
                  default: 1
                  type: number
                _meta:
                  allOf:
                  - "$ref": "#/components/schemas/_types.Metadata"
                model_memory_limit:
                  description: |-
                    The approximate maximum amount of memory resources that are permitted for
                    analytical processing. If your `elasticsearch.yml` file contains an
                    `xpack.ml.max_model_memory_limit` setting, an error occurs when you try
                    to create data frame analytics jobs that have `model_memory_limit` values
                    greater than that setting.
                  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
                  allOf:
                  - "$ref": "#/components/schemas/_types.HttpHeaders"
                version:
                  x-state: Generally available
                  allOf:
                  - "$ref": "#/components/schemas/_types.VersionString"
              required:
              - analysis
              - dest
              - source
            examples:
              MlPutDataFrameAnalyticsExample1:
                description: An example body for a `PUT _ml/data_frame/analytics/model-flight-delays-pre`
                  request.
                value: |-
                  {
                    "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"
                  }
        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:
                    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-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _ml/data_frame/analytics/model-flight-delays-pre
          {
            "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"
          }
      - lang: Python
        source: |-
          resp = client.ml.put_data_frame_analytics(
              id="model-flight-delays-pre",
              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",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.putDataFrameAnalytics({
            id: "model-flight-delays-pre",
            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",
          });
      - lang: Ruby
        source: |-
          response = client.ml.put_data_frame_analytics(
            id: "model-flight-delays-pre",
            body: {
              "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"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->putDataFrameAnalytics([
              "id" => "model-flight-delays-pre",
              "body" => [
                  "source" => [
                      "index" => array(
                          "kibana_sample_data_flights",
                      ),
                      "query" => [
                          "range" => [
                              "DistanceKilometers" => [
                                  "gt" => 0,
                              ],
                          ],
                      ],
                      "_source" => [
                          "includes" => array(
                          ),
                          "excludes" => array(
                              "FlightDelay",
                              "FlightDelayType",
                          ),
                      ],
                  ],
                  "dest" => [
                      "index" => "df-flight-delays",
                      "results_field" => "ml-results",
                  ],
                  "analysis" => [
                      "regression" => [
                          "dependent_variable" => "FlightDelayMin",
                          "training_percent" => 90,
                      ],
                  ],
                  "analyzed_fields" => [
                      "includes" => array(
                      ),
                      "excludes" => array(
                          "FlightNum",
                      ),
                  ],
                  "model_memory_limit" => "100mb",
              ],
          ]);
      - 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
              .analysis(a -> a
                  .regression(r -> r
                      .dependentVariable("FlightDelayMin")
                      .trainingPercent("90")
                  )
              )
              .analyzedFields(an -> an
                  .excludes("FlightNum")
              )
              .dest(d -> d
                  .index("df-flight-delays")
                  .resultsField("ml-results")
              )
              .id("model-flight-delays-pre")
              .modelMemoryLimit("100mb")
              .source(s -> s
                  .index("kibana_sample_data_flights")
                  .query(q -> q
                      .range(r -> r
                          .untyped(u -> u
                              .field("DistanceKilometers")
                              .gt(JsonData.fromJson("0"))
                          )
                      )
                  )
                  .source(so -> so
                      .excludes(List.of("FlightDelay","FlightDelayType"))
                  )
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
    delete:
      tags:
      - ml data frame
      summary: Delete a data frame analytics job
      description: |2


        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-delete-data-frame-analytics
      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
      - 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.
        deprecated: false
        schema:
          type: boolean
        style: form
      - in: query
        name: timeout
        description: The time to wait for the job to be deleted.
        deprecated: false
        schema:
          "$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: |-
                    {
                      "acknowledged": true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _ml/data_frame/analytics/loganalytics

          '
      - lang: Python
        source: |-
          resp = client.ml.delete_data_frame_analytics(
              id="loganalytics",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.deleteDataFrameAnalytics({
            id: "loganalytics",
          });
      - lang: Ruby
        source: |-
          response = client.ml.delete_data_frame_analytics(
            id: "loganalytics"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->deleteDataFrameAnalytics([
              "id" => "loganalytics",
          ]);
      - 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
              .id("loganalytics")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/datafeeds/{datafeed_id}":
    get:
      tags:
      - ml anomaly
      summary: 'Get datafeeds configuration info

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/datafeeds</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/datafeeds/{datafeed_id}</span>\n
        \                     </div>\n                    \n\nYou 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`<feed_id>`, or by omitting
        the `<feed_id>`.\nThis API returns a maximum of 10,000 datafeeds.\n\n## Required
        authorization\n\n* Cluster privileges: `monitor_ml`\n"
      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"
      responses:
        '200':
          "$ref": "#/components/responses/ml.get_datafeeds-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _ml/datafeeds/datafeed-high_sum_total_sales

          '
      - lang: Python
        source: |-
          resp = client.ml.get_datafeeds(
              datafeed_id="datafeed-high_sum_total_sales",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.getDatafeeds({
            datafeed_id: "datafeed-high_sum_total_sales",
          });
      - lang: Ruby
        source: |-
          response = client.ml.get_datafeeds(
            datafeed_id: "datafeed-high_sum_total_sales"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->getDatafeeds([
              "datafeed_id" => "datafeed-high_sum_total_sales",
          ]);
      - 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
              .datafeedId("datafeed-high_sum_total_sales")
          );
      x-metaTags:
      - 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.
        You can associate only one datafeed with each anomaly detection job.
        The datafeed contains a query that runs at a defined interval (`frequency`).
        If you are concerned about delayed data, you can add a delay (`query_delay') at each interval.
        By default, the datafeed uses the following query: `{"match_all": {"boost": 1}}`.

        When 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.
        You must use Kibana, this API, or the create anomaly detection jobs API to create a datafeed. Do not add a datafeed
        directly to the `.ml-config` index. Do not give users `write` privileges on the `.ml-config` index.

        ## Required authorization

        * Index privileges: `read`
        * Cluster privileges: `manage_ml`
      operationId: ml-put-datafeed
      parameters:
      - in: path
        name: 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.
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Id"
        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`
          string or when no indices are specified.
        deprecated: false
        schema:
          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
          whether wildcard expressions match hidden data streams. Supports comma-separated values.

          Supported values include:
            - `all`: Match any data stream or index, including hidden ones.
            - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
            - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
            - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
            - `none`: Wildcard expressions are not accepted.

        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:
                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"
                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;
                    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 search over indices that have already been read in an effort to determine whether
                    any data has subsequently been added to the index. If missing data is found, it is a good indication that the
                    `query_delay` is set too low and the data is being indexed after the datafeed has passed that moment in time.
                    This check runs only on real-time datafeeds.
                  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 either the bucket span for short bucket spans, or, for longer bucket spans, a sensible
                    fraction of the bucket span. When `frequency` is shorter than the bucket span, interim results for the last
                    (partial) bucket are written then eventually overwritten by the full bucket results. If the datafeed uses
                    aggregations, this value must be divisible by the interval of the date histogram aggregation.
                  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
                    nodes 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
                    stops and closes the associated job after this many real-time searches return no documents. In other words,
                    it stops after `frequency` times `max_empty_searches` of real-time operation. If not set, a datafeed with no
                    end time that sees no data remains started until it is explicitly stopped. By default, it is not set.
                  type: number
                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.
                  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
                    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"
                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
                  type: number
                headers:
                  x-state: Generally available
                  allOf:
                  - "$ref": "#/components/schemas/_types.HttpHeaders"
            examples:
              MlPutDatafeedExample1:
                description: An example body for a `PUT _ml/datafeeds/datafeed-test-job?pretty`
                  request.
                value: |-
                  {
                    "indices": [
                      "kibana_sample_data_logs"
                    ],
                    "query": {
                      "bool": {
                        "must": [
                          {
                            "match_all": {}
                          }
                        ]
                      }
                    },
                    "job_id": "test-job"
                  }
        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
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _ml/datafeeds/datafeed-test-job?pretty
          {
            "indices": [
              "kibana_sample_data_logs"
            ],
            "query": {
              "bool": {
                "must": [
                  {
                    "match_all": {}
                  }
                ]
              }
            },
            "job_id": "test-job"
          }
      - lang: Python
        source: |-
          resp = client.ml.put_datafeed(
              datafeed_id="datafeed-test-job",
              pretty=True,
              indices=[
                  "kibana_sample_data_logs"
              ],
              query={
                  "bool": {
                      "must": [
                          {
                              "match_all": {}
                          }
                      ]
                  }
              },
              job_id="test-job",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.putDatafeed({
            datafeed_id: "datafeed-test-job",
            pretty: "true",
            indices: ["kibana_sample_data_logs"],
            query: {
              bool: {
                must: [
                  {
                    match_all: {},
                  },
                ],
              },
            },
            job_id: "test-job",
          });
      - lang: Ruby
        source: |-
          response = client.ml.put_datafeed(
            datafeed_id: "datafeed-test-job",
            pretty: "true",
            body: {
              "indices": [
                "kibana_sample_data_logs"
              ],
              "query": {
                "bool": {
                  "must": [
                    {
                      "match_all": {}
                    }
                  ]
                }
              },
              "job_id": "test-job"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->putDatafeed([
              "datafeed_id" => "datafeed-test-job",
              "pretty" => "true",
              "body" => [
                  "indices" => array(
                      "kibana_sample_data_logs",
                  ),
                  "query" => [
                      "bool" => [
                          "must" => array(
                              [
                                  "match_all" => new ArrayObject([]),
                              ],
                          ),
                      ],
                  ],
                  "job_id" => "test-job",
              ],
          ]);
      - 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
              .datafeedId("datafeed-test-job")
              .indices("kibana_sample_data_logs")
              .jobId("test-job")
              .query(q -> q
                  .bool(b -> b
                      .must(m -> m
                          .matchAll(ma -> ma)
                      )
                  )
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
    delete:
      tags:
      - ml anomaly
      summary: Delete a datafeed
      description: |2


        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-delete-datafeed
      parameters:
      - in: path
        name: 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.
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Id"
        style: simple
      - in: query
        name: force
        description: |-
          Use to forcefully delete a started datafeed; this method is quicker than
          stopping and deleting the datafeed.
        deprecated: false
        schema:
          type: boolean
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
              examples:
                MlDeleteDatafeedResponseExample1:
                  description: A successful response when deleting a datafeed.
                  value: |-
                    {
                      "acknowledged": true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _ml/datafeeds/datafeed-total-requests

          '
      - lang: Python
        source: |-
          resp = client.ml.delete_datafeed(
              datafeed_id="datafeed-total-requests",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.deleteDatafeed({
            datafeed_id: "datafeed-total-requests",
          });
      - lang: Ruby
        source: |-
          response = client.ml.delete_datafeed(
            datafeed_id: "datafeed-total-requests"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->deleteDatafeed([
              "datafeed_id" => "datafeed-total-requests",
          ]);
      - 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
              .datafeedId("datafeed-total-requests")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/filters/{filter_id}":
    get:
      tags:
      - ml anomaly
      summary: 'Get filters

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/filters</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/filters/{filter_id}</span>\n
        \                     </div>\n                    \n\nYou can get a single
        filter or all filters.\n\n## Required authorization\n\n* Cluster privileges:
        `manage_ml`\n"
      operationId: ml-get-filters
      parameters:
      - "$ref": "#/components/parameters/ml.get_filters-filter_id"
      - "$ref": "#/components/parameters/ml.get_filters-from"
      - "$ref": "#/components/parameters/ml.get_filters-size"
      responses:
        '200':
          "$ref": "#/components/responses/ml.get_filters-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _ml/filters/safe_domains

          '
      - lang: Python
        source: |-
          resp = client.ml.get_filters(
              filter_id="safe_domains",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.getFilters({
            filter_id: "safe_domains",
          });
      - lang: Ruby
        source: |-
          response = client.ml.get_filters(
            filter_id: "safe_domains"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->getFilters([
              "filter_id" => "safe_domains",
          ]);
      - 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
              .filterId("safe_domains")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
    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.
        Specifically, filters are referenced in the `custom_rules` property of detector configuration objects.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-put-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"
        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.
                    Up 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: |-
                  {
                    "description": "A list of safe domains",
                    "items": ["*.google.com", "wikipedia.org"]
                  }
        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
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _ml/filters/safe_domains
          {
            "description": "A list of safe domains",
            "items": ["*.google.com", "wikipedia.org"]
          }
      - lang: Python
        source: |-
          resp = client.ml.put_filter(
              filter_id="safe_domains",
              description="A list of safe domains",
              items=[
                  "*.google.com",
                  "wikipedia.org"
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.putFilter({
            filter_id: "safe_domains",
            description: "A list of safe domains",
            items: ["*.google.com", "wikipedia.org"],
          });
      - lang: Ruby
        source: |-
          response = client.ml.put_filter(
            filter_id: "safe_domains",
            body: {
              "description": "A list of safe domains",
              "items": [
                "*.google.com",
                "wikipedia.org"
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->putFilter([
              "filter_id" => "safe_domains",
              "body" => [
                  "description" => "A list of safe domains",
                  "items" => array(
                      "*.google.com",
                      "wikipedia.org",
                  ),
              ],
          ]);
      - 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
              .description("A list of safe domains")
              .filterId("safe_domains")
              .items(List.of("*.google.com","wikipedia.org"))
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
    delete:
      tags:
      - ml anomaly
      summary: Delete a filter
      description: |
        If an anomaly detection job references the filter, you cannot delete the
        filter. You must update or delete the job before you can delete the filter.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-delete-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"
        style: simple
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
              examples:
                MlDeleteFilterResponseExample1:
                  description: A successful response when deleting a filter.
                  value: |-
                    {
                      "acknowledged": true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _ml/filters/safe_domains

          '
      - lang: Python
        source: |-
          resp = client.ml.delete_filter(
              filter_id="safe_domains",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.deleteFilter({
            filter_id: "safe_domains",
          });
      - lang: Ruby
        source: |-
          response = client.ml.delete_filter(
            filter_id: "safe_domains"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->deleteFilter([
              "filter_id" => "safe_domains",
          ]);
      - 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
              .filterId("safe_domains")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/anomaly_detectors/{job_id}":
    get:
      tags:
      - ml anomaly
      summary: 'Get anomaly detection jobs configuration info

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/anomaly_detectors</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/anomaly_detectors/{job_id}</span>\n
        \                     </div>\n                    \n\nYou 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 `<job_id>`, or by omitting the `<job_id>`.\n\n## Required authorization\n\n*
        Cluster privileges: `monitor_ml`\n"
      operationId: ml-get-jobs
      parameters:
      - "$ref": "#/components/parameters/ml.get_jobs-job_id"
      - "$ref": "#/components/parameters/ml.get_jobs-allow_no_match"
      - "$ref": "#/components/parameters/ml.get_jobs-exclude_generated"
      responses:
        '200':
          "$ref": "#/components/responses/ml.get_jobs-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _ml/anomaly_detectors/high_sum_total_sales

          '
      - lang: Python
        source: |-
          resp = client.ml.get_jobs(
              job_id="high_sum_total_sales",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.getJobs({
            job_id: "high_sum_total_sales",
          });
      - lang: Ruby
        source: |-
          response = client.ml.get_jobs(
            job_id: "high_sum_total_sales"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->getJobs([
              "job_id" => "high_sum_total_sales",
          ]);
      - 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
              .jobId("high_sum_total_sales")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
    put:
      tags:
      - ml anomaly
      summary: Create an anomaly detection job
      description: |
        If you include a `datafeed_config`, you must have read index privileges on the source index.
        If you include a `datafeed_config` but do not provide a query, the datafeed uses `{"match_all": {"boost": 1}}`.

        ## Required authorization

        * Index privileges: `read`
        * Cluster privileges: `manage_ml`
      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: allow_no_indices
        description: |-
          If `true`, wildcard indices expressions that resolve into no concrete indices are ignored. This includes the
          `_all` string or when no indices are specified.
        deprecated: false
        schema:
          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
          whether wildcard expressions match hidden data streams. Supports comma-separated values.

          Supported values include:
            - `all`: Match any data stream or index, including hidden ones.
            - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
            - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
            - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
            - `none`: Wildcard expressions are not accepted.

        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
                  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
                  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: |-
                  {
                    "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"
                    }
                  }
        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.DateTime"
                  custom_settings:
                    allOf:
                    - "$ref": "#/components/schemas/ml._types.CustomSettings"
                  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:
                    type: string
                  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:
                    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
              examples:
                MlPutJobResponseExample1:
                  description: A successful response when creating an anomaly detection
                    job and datafeed.
                  value: |-
                    {
                      "job_id": "test-job1",
                      "job_type": "anomaly_detector",
                      "job_version": "8.4.0",
                      "create_time": 1656087283340,
                      "datafeed_config": {
                        "datafeed_id": "datafeed-test-job1",
                        "job_id": "test-job1",
                        "authorization": {
                          "roles": [
                            "superuser"
                          ]
                        },
                        "query_delay": "61499ms",
                        "chunking_config": {
                          "mode": "auto"
                        },
                        "indices_options": {
                          "expand_wildcards": [
                            "open"
                          ],
                          "ignore_unavailable": false,
                          "allow_no_indices": true,
                          "ignore_throttled": true
                        },
                        "query": {
                          "bool": {
                            "must": [
                              {
                                "match_all": {}
                              }
                            ]
                          }
                        },
                        "indices": [
                          "kibana_sample_data_logs"
                        ],
                        "scroll_size": 1000,
                        "delayed_data_check_config": {
                          "enabled": true
                        },
                        "runtime_mappings": {
                          "hour_of_day": {
                            "type": "long",
                            "script": {
                              "source": "emit(doc['timestamp'].value.getHour());"
                            }
                          }
                        }
                      },
                      "analysis_config": {
                        "bucket_span": "15m",
                        "detectors": [
                          {
                            "detector_description": "Sum of bytes",
                            "function": "sum",
                            "field_name": "bytes",
                            "detector_index": 0
                          }
                        ],
                        "influencers": [],
                        "model_prune_window": "30d"
                      },
                      "analysis_limits": {
                        "model_memory_limit": "11mb",
                        "categorization_examples_limit": 4
                      },
                      "data_description": {
                        "time_field": "timestamp",
                        "time_format": "epoch_ms"
                      },
                      "model_plot_config": {
                        "enabled": true,
                        "annotations_enabled": true
                      },
                      "model_snapshot_retention_days": 10,
                      "daily_model_snapshot_retention_after_days": 1,
                      "results_index_name": "custom-test-job1",
                      "allow_lazy_open": false
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT /_ml/anomaly_detectors/job-01
          {
            "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"
            }
          }
      - lang: Python
        source: |-
          resp = client.ml.put_job(
              job_id="job-01",
              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"
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.putJob({
            job_id: "job-01",
            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",
            },
          });
      - lang: Ruby
        source: |-
          response = client.ml.put_job(
            job_id: "job-01",
            body: {
              "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"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->putJob([
              "job_id" => "job-01",
              "body" => [
                  "analysis_config" => [
                      "bucket_span" => "15m",
                      "detectors" => array(
                          [
                              "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" => array(
                          "kibana_sample_data_logs",
                      ),
                      "query" => [
                          "bool" => [
                              "must" => array(
                                  [
                                      "match_all" => new ArrayObject([]),
                                  ],
                              ),
                          ],
                      ],
                      "runtime_mappings" => [
                          "hour_of_day" => [
                              "type" => "long",
                              "script" => [
                                  "source" => "emit(doc['timestamp'].value.getHour());",
                              ],
                          ],
                      ],
                      "datafeed_id" => "datafeed-test-job1",
                  ],
              ],
          ]);
      - 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
              .analysisConfig(a -> a
                  .bucketSpan(b -> b
                      .time("15m")
                  )
                  .detectors(d -> d
                      .detectorDescription("Sum of bytes")
                      .fieldName("bytes")
                      .function("sum")
                  )
              )
              .analysisLimits(an -> an
                  .modelMemoryLimit("11MB")
              )
              .dataDescription(d -> d
                  .timeField("timestamp")
                  .timeFormat("epoch_ms")
              )
              .datafeedConfig(d -> d
                  .datafeedId("datafeed-test-job1")
                  .indices("kibana_sample_data_logs")
                  .query(q -> q
                      .bool(b -> b
                          .must(m -> m
                              .matchAll(ma -> ma)
                          )
                      )
                  )
                  .runtimeMappings("hour_of_day", r -> r
                      .script(s -> s
                          .source(so -> so
                              .scriptString("emit(doc['timestamp'].value.getHour());")
                          )
                      )
                      .type(RuntimeFieldType.Long)
                  )
              )
              .jobId("job-01")
              .modelPlotConfig(m -> m
                  .annotationsEnabled(true)
                  .enabled(true)
              )
              .resultsIndexName("test-job1")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
    delete:
      tags:
      - ml anomaly
      summary: Delete an anomaly detection job
      description: |
        All job configuration, model state and results are deleted.
        It is not currently possible to delete multiple jobs using wildcards or a
        comma separated list. If you delete a job that has a datafeed, the request
        first tries to delete the datafeed. This behavior is equivalent to calling
        the delete datafeed API with the same timeout and force parameters as the
        delete job request.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-delete-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
      - in: query
        name: force
        description: |-
          Use to forcefully delete an opened job; this method is quicker than
          closing and deleting the job.
        deprecated: false
        schema:
          type: boolean
        style: form
      - in: query
        name: delete_user_annotations
        description: |-
          Specifies whether annotations that have been added by the
          user should be deleted along with any auto-generated annotations when the job is
          reset.
        deprecated: false
        schema:
          type: boolean
        style: form
      - in: query
        name: wait_for_completion
        description: |-
          Specifies whether the request should return immediately or wait until the
          job deletion completes.
        deprecated: false
        schema:
          type: boolean
        style: form
      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: |-
                    {
                      "acknowledged": true
                    }
                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.

                    '
                  value: |-
                    {
                      "task": "oTUltX4IQMOUUVeiohTt8A:39"
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _ml/anomaly_detectors/total-requests

          '
      - lang: Python
        source: |-
          resp = client.ml.delete_job(
              job_id="total-requests",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.deleteJob({
            job_id: "total-requests",
          });
      - lang: Ruby
        source: |-
          response = client.ml.delete_job(
            job_id: "total-requests"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->deleteJob([
              "job_id" => "total-requests",
          ]);
      - 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
              .jobId("total-requests")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/trained_models/{model_id}":
    get:
      tags:
      - ml trained model
      summary: 'Get trained model configuration info

        '
      description: |
        **All methods and paths for this operation:**

        <div>
                              <span class="operation-verb get">GET</span>
                              <span class="operation-path">/_ml/trained_models</span>
                              </div>
                            <div>
                              <span class="operation-verb get">GET</span>
                              <span class="operation-path">/_ml/trained_models/{model_id}</span>
                              </div>

        ## Required authorization

        * Cluster privileges: `monitor_ml`
      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"
      responses:
        '200':
          "$ref": "#/components/responses/ml.get_trained_models-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _ml/trained_models/

          '
      - 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);

          '
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
    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.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-put-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
      - in: query
        name: defer_definition_decompression
        description: |-
          If set to `true` and a `compressed_definition` is provided,
          the request defers definition decompression and skips relevant
          validations.
        deprecated: false
        schema:
          type: boolean
        x-state: Generally available
        style: form
      - in: query
        name: wait_for_completion
        description: |-
          Whether to wait for all child operations (e.g. model download)
          to complete.
        deprecated: false
        schema:
          type: boolean
        x-state: Generally available
        style: form
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                compressed_definition:
                  description: |-
                    The compressed (GZipped and Base64 encoded) inference definition of the
                    model. If compressed_definition is specified, then definition cannot be
                    specified.
                  type: string
                definition:
                  description: |-
                    The inference definition for the model. If definition is specified, then
                    compressed_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
                    or classification configuration. 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.put_trained_model.Input"
                metadata:
                  description: An object map that contains metadata about the model.
                  type: object
                model_type:
                  description: |+
                    The model type.

                    Supported values include:
                      - `tree_ensemble`: The model definition is an ensemble model of decision trees.
                      - `lang_ident`: A special type reserved for language identification models.
                      - `pytorch`: The stored definition is a PyTorch (specifically a TorchScript) model.
                    Currently only NLP models are supported.

                  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.
                    This property is supported only if defer_definition_decompression is true
                    or the model definition is not supplied.
                  type: number
                platform_architecture:
                  description: |-
                    The platform architecture (if applicable) of the trained mode. If the model
                    only works on one platform, because it is heavily optimized for a particular
                    processor architecture and OS combination, then this field specifies which.
                    The format of the string must match the platform identifiers used by Elasticsearch,
                    so one of, `linux-x86_64`, `linux-aarch64`, `darwin-x86_64`, `darwin-aarch64`,
                    or `windows-x86_64`. For portable models (those that work independent of processor
                    architecture 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
                  allOf:
                  - "$ref": "#/components/schemas/ml._types.TrainedModelPrefixStrings"
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ml._types.TrainedModelConfig"
      x-state: Generally available
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
    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.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-delete-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
      - 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.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Duration"
        style: form
      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: |-
                    {
                      "acknowledged": true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _ml/trained_models/regression-job-one-1574775307356

          '
      - lang: Python
        source: |-
          resp = client.ml.delete_trained_model(
              model_id="regression-job-one-1574775307356",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.deleteTrainedModel({
            model_id: "regression-job-one-1574775307356",
          });
      - lang: Ruby
        source: |-
          response = client.ml.delete_trained_model(
            model_id: "regression-job-one-1574775307356"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->deleteTrainedModel([
              "model_id" => "regression-job-one-1574775307356",
          ]);
      - 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
              .modelId("regression-job-one-1574775307356")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_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
        model.
        You can use aliases instead of trained model identifiers to make it easier to
        reference your models. For example, you can use aliases in inference
        aggregations and processors.
        An alias must be unique and refer to only a single trained model. However,
        you can have multiple aliases for each trained model.
        If you use this API to update an alias such that it references a different
        trained model ID and the model uses a different type of data frame analytics,
        an error occurs. For example, this situation occurs if you have a trained
        model for regression analysis and a trained model for classification
        analysis; you cannot reassign an alias from one type of trained model to
        another.
        If you use this API to update an alias and there are very few input fields in
        common between the old and new trained models for the model alias, the API
        returns a warning.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-put-trained-model-alias
      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.
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Name"
        style: simple
      - in: query
        name: reassign
        description: |-
          Specifies whether the alias gets reassigned to the specified trained
          model if it is already assigned to a different model. If the alias is
          already assigned and this parameter is false, the API returns an error.
        deprecated: false
        schema:
          type: boolean
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'PUT _ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model

          '
      - lang: Python
        source: |-
          resp = client.ml.put_trained_model_alias(
              model_id="flight-delay-prediction-1574775339910",
              model_alias="flight_delay_model",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.putTrainedModelAlias({
            model_id: "flight-delay-prediction-1574775339910",
            model_alias: "flight_delay_model",
          });
      - lang: Ruby
        source: |-
          response = client.ml.put_trained_model_alias(
            model_id: "flight-delay-prediction-1574775339910",
            model_alias: "flight_delay_model"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->putTrainedModelAlias([
              "model_id" => "flight-delay-prediction-1574775339910",
              "model_alias" => "flight_delay_model",
          ]);
      - 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
              .modelAlias("flight_delay_model")
              .modelId("flight-delay-prediction-1574775339910")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
    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
        the model alias is missing or refers to a model other than the one identified
        by the `model_id`, this API returns an error.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-delete-trained-model-alias
      parameters:
      - 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
      - in: path
        name: model_alias
        description: The model alias 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"
              examples:
                MlDeleteTrainedModelAliasResponseExample1:
                  description: A successful response when deleting a trained model
                    alias.
                  value: |-
                    {
                      "acknowledged": true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _ml/trained_models/flight-delay-prediction-1574775339910/model_aliases/flight_delay_model

          '
      - lang: Python
        source: |-
          resp = client.ml.delete_trained_model_alias(
              model_id="flight-delay-prediction-1574775339910",
              model_alias="flight_delay_model",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.deleteTrainedModelAlias({
            model_id: "flight-delay-prediction-1574775339910",
            model_alias: "flight_delay_model",
          });
      - lang: Ruby
        source: |-
          response = client.ml.delete_trained_model_alias(
            model_id: "flight-delay-prediction-1574775339910",
            model_alias: "flight_delay_model"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->deleteTrainedModelAlias([
              "model_id" => "flight-delay-prediction-1574775339910",
              "model_alias" => "flight_delay_model",
          ]);
      - 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
              .modelAlias("flight_delay_model")
              .modelId("flight-delay-prediction-1574775339910")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_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.
        The estimate is based on analysis configuration details for the job and cardinality
        estimates for the fields it references.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      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
                    `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
                    for influencer fields over the time period that the job analyzes data.
                    To produce a good answer, values must be provided for all influencer
                    fields. Providing values for fields that are not listed as `influencers`
                    has no effect on the estimation.
                  type: object
                  additionalProperties:
                    type: number
                overall_cardinality:
                  description: |-
                    Estimates of the cardinality that is observed for fields over the whole
                    time period that the job analyzes data. To produce a good answer, values
                    must be provided for fields referenced in the `by_field_name`,
                    `over_field_name` and `partition_field_name` of any detectors. Providing
                    values for other fields has no effect on the estimation. It can be
                    omitted from the request if no detectors have a `by_field_name`,
                    `over_field_name` or `partition_field_name`.
                  type: object
                  additionalProperties:
                    type: number
            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: |-
                  {
                    "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
                    }
                  }
        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: |-
                    {
                      "model_memory_estimate": "21mb"
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _ml/anomaly_detectors/_estimate_model_memory
          {
            "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
            }
          }
      - lang: Python
        source: |-
          resp = client.ml.estimate_model_memory(
              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
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.estimateModelMemory({
            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,
            },
          });
      - lang: Ruby
        source: |-
          response = client.ml.estimate_model_memory(
            body: {
              "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
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->estimateModelMemory([
              "body" => [
                  "analysis_config" => [
                      "bucket_span" => "5m",
                      "detectors" => array(
                          [
                              "function" => "sum",
                              "field_name" => "bytes",
                              "by_field_name" => "status",
                              "partition_field_name" => "app",
                          ],
                      ),
                      "influencers" => array(
                          "source_ip",
                          "dest_ip",
                      ),
                  ],
                  "overall_cardinality" => [
                      "status" => 10,
                      "app" => 50,
                  ],
                  "max_bucket_cardinality" => [
                      "source_ip" => 300,
                      "dest_ip" => 30,
                  ],
              ],
          ]);
      - 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
              .analysisConfig(a -> a
                  .bucketSpan(b -> b
                      .time("5m")
                  )
                  .detectors(d -> d
                      .byFieldName("status")
                      .fieldName("bytes")
                      .function("sum")
                      .partitionFieldName("app")
                  )
                  .influencers(List.of("source_ip","dest_ip"))
              )
              .maxBucketCardinality(Map.of("dest_ip", 30L,"source_ip", 300L))
              .overallCardinality(Map.of("app", 50L,"status", 10L))
          );
      x-metaTags:
      - 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
        of machine learning features. This has been designed for use on indexes
        created by data frame analytics. Evaluation requires both a ground truth
        field and an analytics result field to be present.

        ## Required authorization

        * Cluster privileges: `monitor_ml`
      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"
                index:
                  description: Defines the `index` in which the evaluation will be
                    performed.
                  allOf:
                  - "$ref": "#/components/schemas/_types.IndexName"
                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
            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.

                  '
                value: |-
                  {
                    "index": "animal_classification",
                    "evaluation": {
                      "classification": {
                        "actual_field": "animal_class",
                        "predicted_field": "ml.animal_class_prediction",
                        "metrics": {
                          "multiclass_confusion_matrix": {}
                        }
                      }
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "index": "animal_classification",
                    "evaluation": {
                      "classification": {
                        "actual_field": "animal_class",
                        "metrics": {
                          "auc_roc": {
                            "class_name": "dog"
                          }
                        }
                      }
                    }
                  }
              MlEvaluateDataFrameRequestExample3:
                summary: Outlier detection
                description: 'Run `POST _ml/data_frame/_evaluate` to evaluate an outlier
                  detection job for an annotated index.

                  '
                value: |-
                  {
                    "index": "my_analytics_dest_index",
                    "evaluation": {
                      "outlier_detection": {
                        "actual_field": "is_outlier",
                        "predicted_probability_field": "ml.outlier_score"
                      }
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "index": "house_price_predictions",
                    "query": {
                      "bool": {
                        "filter": [
                          {
                            "term": {
                              "ml.is_training": false
                            }
                          }
                        ]
                      }
                    },
                    "evaluation": {
                      "regression": {
                        "actual_field": "price",
                        "predicted_field": "ml.price_prediction",
                        "metrics": {
                          "r_squared": {},
                          "mse": {},
                          "msle": {
                            "offset": 10
                          },
                          "huber": {
                            "delta": 1.5
                          }
                        }
                      }
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "index": "house_price_predictions",
                    "query": {
                      "term": {
                        "ml.is_training": {
                          "value": true
                        }
                      }
                    },
                    "evaluation": {
                      "regression": {
                        "actual_field": "price",
                        "predicted_field": "ml.price_prediction",
                        "metrics": {
                          "r_squared": {},
                          "mse": {},
                          "msle": {},
                          "huber": {}
                        }
                      }
                    }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  classification:
                    description: |-
                      Evaluation results for a classification analysis.
                      It 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.
                      It 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.

                    '
                  value: |-
                    {
                      "classification": {
                        "multiclass_confusion_matrix": {
                          "confusion_matrix": [
                            {
                              "actual_class": "cat",
                              "actual_class_doc_count": 12,
                              "predicted_classes": [
                                {
                                  "predicted_class": "cat",
                                  "count": 12
                                },
                                {
                                  "predicted_class": "dog",
                                  "count": 0
                                }
                              ],
                              "other_predicted_class_doc_count": 0
                            },
                            {
                              "actual_class": "dog",
                              "actual_class_doc_count": 11,
                              "predicted_classes": [
                                {
                                  "predicted_class": "dog",
                                  "count": 7
                                },
                                {
                                  "predicted_class": "cat",
                                  "count": 4
                                }
                              ],
                              "other_predicted_class_doc_count": 0
                            }
                          ],
                          "other_actual_class_count": 0
                        }
                      }
                    }
                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.

                    '
                  value: |-
                    {
                      "classification": {
                        "auc_roc": {
                          "value": 0.8941788639536681
                        }
                      }
                    }
                MlEvaluateDataFrameResponseExample3:
                  summary: Outlier detection
                  description: A successful response from `POST _ml/data_frame/_evaluate`
                    to evaluate an outlier detection job.
                  value: |-
                    {
                      "outlier_detection": {
                        "auc_roc": {
                          "value": 0.9258475774641445
                        },
                        "confusion_matrix": {
                          "0.25": {
                            "tp": 5,
                            "fp": 9,
                            "tn": 204,
                            "fn": 5
                          },
                          "0.5": {
                            "tp": 1,
                            "fp": 5,
                            "tn": 208,
                            "fn": 9
                          },
                          "0.75": {
                            "tp": 0,
                            "fp": 4,
                            "tn": 209,
                            "fn": 10
                          }
                        },
                        "precision": {
                          "0.25": 0.35714285714285715,
                          "0.5": 0.16666666666666666,
                          "0.75": 0
                        },
                        "recall": {
                          "0.25": 0.5,
                          "0.5": 0.1,
                          "0.75": 0
                        }
                      }
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _ml/data_frame/_evaluate
          {
            "index": "animal_classification",
            "evaluation": {
              "classification": {
                "actual_field": "animal_class",
                "predicted_field": "ml.animal_class_prediction",
                "metrics": {
                  "multiclass_confusion_matrix": {}
                }
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.ml.evaluate_data_frame(
              index="animal_classification",
              evaluation={
                  "classification": {
                      "actual_field": "animal_class",
                      "predicted_field": "ml.animal_class_prediction",
                      "metrics": {
                          "multiclass_confusion_matrix": {}
                      }
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.evaluateDataFrame({
            index: "animal_classification",
            evaluation: {
              classification: {
                actual_field: "animal_class",
                predicted_field: "ml.animal_class_prediction",
                metrics: {
                  multiclass_confusion_matrix: {},
                },
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.ml.evaluate_data_frame(
            body: {
              "index": "animal_classification",
              "evaluation": {
                "classification": {
                  "actual_field": "animal_class",
                  "predicted_field": "ml.animal_class_prediction",
                  "metrics": {
                    "multiclass_confusion_matrix": {}
                  }
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->evaluateDataFrame([
              "body" => [
                  "index" => "animal_classification",
                  "evaluation" => [
                      "classification" => [
                          "actual_field" => "animal_class",
                          "predicted_field" => "ml.animal_class_prediction",
                          "metrics" => [
                              "multiclass_confusion_matrix" => new ArrayObject([]),
                          ],
                      ],
                  ],
              ],
          ]);
      - 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
              .evaluation(ev -> ev
                  .classification(c -> c
                      .actualField("animal_class")
                      .predictedField("ml.animal_class_prediction")
                      .metrics(m -> m)
                  )
              )
              .index("animal_classification")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_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
        the post data API. Depending on the content of the buffer, then it might
        additionally calculate new results. Both flush and close operations are
        similar, however the flush is more efficient if you are expecting to send
        more data for analysis. When flushing, the job remains open and is available
        to continue analyzing data. A close operation additionally prunes and
        persists the model state to disk and the job must be opened again before
        analyzing further data.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-flush-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
      - in: query
        name: advance_time
        description: |-
          Specifies to advance to a particular time value. Results are generated
          and the model is updated for data from the specified time interval.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.DateTime"
        style: form
      - in: query
        name: calc_interim
        description: |-
          If true, calculates the interim results for the most recent bucket or all
          buckets within the latency period.
        deprecated: false
        schema:
          type: boolean
        style: form
      - in: query
        name: end
        description: |-
          When used in conjunction with `calc_interim` and `start`, specifies the
          range of buckets on which to calculate interim results.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.DateTime"
        style: form
      - in: query
        name: skip_time
        description: |-
          Specifies to skip to a particular time value. Results are not generated
          and the model is not updated for data from the specified time interval.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.DateTime"
        style: form
      - in: query
        name: start
        description: |-
          When used in conjunction with `calc_interim`, specifies the range of
          buckets 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: |-
                  {
                    "calc_interim": true
                  }
      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
                      the last bucket that was processed.
                    type: number
                required:
                - flushed
      deprecated: true
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _ml/anomaly_detectors/low_request_rate/_flush
          {
            "calc_interim": true
          }
      - lang: Python
        source: |-
          resp = client.ml.flush_job(
              job_id="low_request_rate",
              calc_interim=True,
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.flushJob({
            job_id: "low_request_rate",
            calc_interim: true,
          });
      - lang: Ruby
        source: |-
          response = client.ml.flush_job(
            job_id: "low_request_rate",
            body: {
              "calc_interim": true
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->flushJob([
              "job_id" => "low_request_rate",
              "body" => [
                  "calc_interim" => true,
              ],
          ]);
      - 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
              .calcInterim(true)
              .jobId("low_request_rate")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/calendars/{calendar_id}/events":
    get:
      tags:
      - ml anomaly
      summary: Get info about events in calendars
      description: |2


        ## Required authorization

        * Cluster privileges: `monitor_ml`
      operationId: ml-get-calendar-events
      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: end
        description: Specifies to get events with timestamps earlier than this time.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.DateTime"
        style: form
      - in: query
        name: from
        description: Skips the specified number of events.
        deprecated: false
        schema:
          type: number
        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 `*`.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Id"
        style: form
      - in: query
        name: size
        description: Specifies the maximum number of events to obtain.
        deprecated: false
        schema:
          type: number
        style: form
      - 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
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _ml/calendars/planned-outages/events

          '
      - lang: Python
        source: |-
          resp = client.ml.get_calendar_events(
              calendar_id="planned-outages",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.getCalendarEvents({
            calendar_id: "planned-outages",
          });
      - lang: Ruby
        source: |-
          response = client.ml.get_calendar_events(
            calendar_id: "planned-outages"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->getCalendarEvents([
              "calendar_id" => "planned-outages",
          ]);
      - 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
              .calendarId("planned-outages")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
    post:
      tags:
      - ml anomaly
      summary: Add scheduled events to the calendar
      description: |2


        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-post-calendar-events
      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:
                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: |-
                  {
                    "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}
                    ]
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  events:
                    type: array
                    items:
                      "$ref": "#/components/schemas/ml._types.CalendarEvent"
                required:
                - events
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _ml/calendars/planned-outages/events
          {
            "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}
            ]
          }
      - lang: Python
        source: |-
          resp = client.ml.post_calendar_events(
              calendar_id="planned-outages",
              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
                  }
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.postCalendarEvents({
            calendar_id: "planned-outages",
            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,
              },
            ],
          });
      - lang: Ruby
        source: |-
          response = client.ml.post_calendar_events(
            calendar_id: "planned-outages",
            body: {
              "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
                }
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->postCalendarEvents([
              "calendar_id" => "planned-outages",
              "body" => [
                  "events" => array(
                      [
                          "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,
                      ],
                  ),
              ],
          ]);
      - 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
              .calendarId("planned-outages")
              .events(List.of(CalendarEvent.of(c -> c
                      .description("event 1")
                      .endTime(DateTime.ofEpochMilli(1513728000000L))
                      .startTime(DateTime.ofEpochMilli(1513641600000L))
                  ),CalendarEvent.of(c -> c
                      .description("event 2")
                      .endTime(DateTime.ofEpochMilli(1513900800000L))
                      .startTime(DateTime.ofEpochMilli(1513814400000L))
                  ),CalendarEvent.of(c -> c
                      .description("event 3")
                      .endTime(DateTime.ofEpochMilli(1514246400000L))
                      .startTime(DateTime.ofEpochMilli(1514160000000L))
                  )))
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/data_frame/analytics/{id}/_stats":
    get:
      tags:
      - ml data frame
      summary: 'Get data frame analytics job stats

        '
      description: |
        **All methods and paths for this operation:**

        <div>
                              <span class="operation-verb get">GET</span>
                              <span class="operation-path">/_ml/data_frame/analytics/_stats</span>
                              </div>
                            <div>
                              <span class="operation-verb get">GET</span>
                              <span class="operation-path">/_ml/data_frame/analytics/{id}/_stats</span>
                              </div>

        ## Required authorization

        * Cluster privileges: `monitor_ml`
      operationId: ml-get-data-frame-analytics-stats
      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"
      - "$ref": "#/components/parameters/ml.get_data_frame_analytics_stats-verbose"
      responses:
        '200':
          "$ref": "#/components/responses/ml.get_data_frame_analytics_stats-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _ml/data_frame/analytics/weblog-outliers/_stats

          '
      - lang: Python
        source: |-
          resp = client.ml.get_data_frame_analytics_stats(
              id="weblog-outliers",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.getDataFrameAnalyticsStats({
            id: "weblog-outliers",
          });
      - lang: Ruby
        source: |-
          response = client.ml.get_data_frame_analytics_stats(
            id: "weblog-outliers"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->getDataFrameAnalyticsStats([
              "id" => "weblog-outliers",
          ]);
      - 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
              .id("weblog-outliers")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/datafeeds/{datafeed_id}/_stats":
    get:
      tags:
      - ml anomaly
      summary: 'Get datafeed stats

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/datafeeds/_stats</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/datafeeds/{datafeed_id}/_stats</span>\n
        \                     </div>\n                    \n\nYou 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`<feed_id>`, or by omitting
        the `<feed_id>`. 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.\n\n## Required authorization\n\n* Cluster privileges: `monitor_ml`\n"
      operationId: ml-get-datafeed-stats
      parameters:
      - "$ref": "#/components/parameters/ml.get_datafeed_stats-datafeed_id"
      - "$ref": "#/components/parameters/ml.get_datafeed_stats-allow_no_match"
      responses:
        '200':
          "$ref": "#/components/responses/ml.get_datafeed_stats-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _ml/datafeeds/datafeed-high_sum_total_sales/_stats

          '
      - lang: Python
        source: |-
          resp = client.ml.get_datafeed_stats(
              datafeed_id="datafeed-high_sum_total_sales",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.getDatafeedStats({
            datafeed_id: "datafeed-high_sum_total_sales",
          });
      - lang: Ruby
        source: |-
          response = client.ml.get_datafeed_stats(
            datafeed_id: "datafeed-high_sum_total_sales"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->getDatafeedStats([
              "datafeed_id" => "datafeed-high_sum_total_sales",
          ]);
      - 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
              .datafeedId("datafeed-high_sum_total_sales")
          );
      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

        '
      description: |
        **All methods and paths for this operation:**

        <div>
                              <span class="operation-verb get">GET</span>
                              <span class="operation-path">/_ml/anomaly_detectors/_stats</span>
                              </div>
                            <div>
                              <span class="operation-verb get">GET</span>
                              <span class="operation-path">/_ml/anomaly_detectors/{job_id}/_stats</span>
                              </div>

        ## Required authorization

        * Cluster privileges: `monitor_ml`
      operationId: ml-get-job-stats
      parameters:
      - "$ref": "#/components/parameters/ml.get_job_stats-job_id"
      - "$ref": "#/components/parameters/ml.get_job_stats-allow_no_match"
      responses:
        '200':
          "$ref": "#/components/responses/ml.get_job_stats-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _ml/anomaly_detectors/low_request_rate/_stats

          '
      - lang: Python
        source: |-
          resp = client.ml.get_job_stats(
              job_id="low_request_rate",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.getJobStats({
            job_id: "low_request_rate",
          });
      - lang: Ruby
        source: |-
          response = client.ml.get_job_stats(
            job_id: "low_request_rate"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->getJobStats([
              "job_id" => "low_request_rate",
          ]);
      - 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
              .jobId("low_request_rate")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/anomaly_detectors/{job_id}/results/overall_buckets":
    post:
      tags:
      - ml anomaly
      summary: 'Get overall bucket results

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/anomaly_detectors/{job_id}/results/overall_buckets</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_ml/anomaly_detectors/{job_id}/results/overall_buckets</span>\n
        \                     </div>\n                    \n\nRetrievs 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.\n\n##
        Required authorization\n\n* Cluster privileges: `monitor_ml`\n"
      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"
      - "$ref": "#/components/parameters/ml.get_overall_buckets-top_n"
      requestBody:
        "$ref": "#/components/requestBodies/ml.get_overall_buckets"
      responses:
        '200':
          "$ref": "#/components/responses/ml.get_overall_buckets-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          GET _ml/anomaly_detectors/job-*/results/overall_buckets
          {
            "overall_score": 80,
            "start": "1403532000000"
          }
      - lang: Python
        source: |-
          resp = client.ml.get_overall_buckets(
              job_id="job-*",
              overall_score=80,
              start="1403532000000",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.getOverallBuckets({
            job_id: "job-*",
            overall_score: 80,
            start: 1403532000000,
          });
      - lang: Ruby
        source: |-
          response = client.ml.get_overall_buckets(
            job_id: "job-*",
            body: {
              "overall_score": 80,
              "start": "1403532000000"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->getOverallBuckets([
              "job_id" => "job-*",
              "body" => [
                  "overall_score" => 80,
                  "start" => "1403532000000",
              ],
          ]);
      - 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
              .jobId("job-*")
              .overallScore(80.0D)
              .start(DateTime.of("1403532000000"))
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/trained_models/{model_id}/_stats":
    get:
      tags:
      - ml trained model
      summary: 'Get trained models usage info

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/trained_models/_stats</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/trained_models/{model_id}/_stats</span>\n
        \                     </div>\n                    \n\nYou 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.\n\n## Required authorization\n\n*
        Cluster privileges: `monitor_ml`\n"
      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"
      responses:
        '200':
          "$ref": "#/components/responses/ml.get_trained_models_stats-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _ml/trained_models/_stats

          '
      - 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);

          '
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_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
      - 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
                    configured trained model input. Typically, for NLP models, the field name is `text_field`.
                    Currently, 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: |-
                  {
                    "docs":[{"text": "The fool doth think he is wise, but the wise man knows himself to be a fool."}]
                  }
        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
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _ml/trained_models/lang_ident_model_1/_infer
          {
            "docs":[{"text": "The fool doth think he is wise, but the wise man knows himself to be a fool."}]
          }
      - lang: Python
        source: |-
          resp = client.ml.infer_trained_model(
              model_id="lang_ident_model_1",
              docs=[
                  {
                      "text": "The fool doth think he is wise, but the wise man knows himself to be a fool."
                  }
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.inferTrainedModel({
            model_id: "lang_ident_model_1",
            docs: [
              {
                text: "The fool doth think he is wise, but the wise man knows himself to be a fool.",
              },
            ],
          });
      - lang: Ruby
        source: |-
          response = client.ml.infer_trained_model(
            model_id: "lang_ident_model_1",
            body: {
              "docs": [
                {
                  "text": "The fool doth think he is wise, but the wise man knows himself to be a fool."
                }
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->inferTrainedModel([
              "model_id" => "lang_ident_model_1",
              "body" => [
                  "docs" => array(
                      [
                          "text" => "The fool doth think he is wise, but the wise man knows himself to be a fool.",
                      ],
                  ),
              ],
          ]);
      - 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
              .docs(Map.of("text", JsonData.fromJson("\"The fool doth think he is wise, but the wise man knows himself to be a fool.\"")))
              .modelId("lang_ident_model_1")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_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
        data. It can be opened and closed multiple times throughout its lifecycle.
        When you open a new job, it starts with an empty model.
        When you open an existing job, the most recent model state is automatically
        loaded. The job is ready to resume its analysis from where it left off, once
        new data is received.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      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
      - 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
      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.

                  '
                value: |-
                  {
                    "timeout": "35m"
                  }
      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".
                      If 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: |-
                    {
                      "opened": true,
                      "node": "node-1"
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST /_ml/anomaly_detectors/job-01/_open
          {
            "timeout": "35m"
          }
      - lang: Python
        source: |-
          resp = client.ml.open_job(
              job_id="job-01",
              timeout="35m",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.openJob({
            job_id: "job-01",
            timeout: "35m",
          });
      - lang: Ruby
        source: |-
          response = client.ml.open_job(
            job_id: "job-01",
            body: {
              "timeout": "35m"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->openJob([
              "job_id" => "job-01",
              "body" => [
                  "timeout" => "35m",
              ],
          ]);
      - 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
              .jobId("job-01")
              .timeout(t -> t
                  .time("35m")
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/data_frame/analytics/{id}/_preview":
    post:
      tags:
      - ml data frame
      summary: 'Preview features used by data frame analytics

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/data_frame/analytics/_preview</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_ml/data_frame/analytics/_preview</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/data_frame/analytics/{id}/_preview</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_ml/data_frame/analytics/{id}/_preview</span>\n
        \                     </div>\n                    \n\nPreview the extracted
        features used by a data frame analytics config.\n\n## Required authorization\n\n*
        Cluster privileges: `monitor_ml`\n"
      operationId: ml-preview-data-frame-analytics
      parameters:
      - "$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"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _ml/data_frame/analytics/_preview
          {
            "config": {
              "source": {
                "index": "houses_sold_last_10_yrs"
              },
              "analysis": {
                "regression": {
                  "dependent_variable": "price"
                }
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.ml.preview_data_frame_analytics(
              config={
                  "source": {
                      "index": "houses_sold_last_10_yrs"
                  },
                  "analysis": {
                      "regression": {
                          "dependent_variable": "price"
                      }
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.previewDataFrameAnalytics({
            config: {
              source: {
                index: "houses_sold_last_10_yrs",
              },
              analysis: {
                regression: {
                  dependent_variable: "price",
                },
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.ml.preview_data_frame_analytics(
            body: {
              "config": {
                "source": {
                  "index": "houses_sold_last_10_yrs"
                },
                "analysis": {
                  "regression": {
                    "dependent_variable": "price"
                  }
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->previewDataFrameAnalytics([
              "body" => [
                  "config" => [
                      "source" => [
                          "index" => "houses_sold_last_10_yrs",
                      ],
                      "analysis" => [
                          "regression" => [
                              "dependent_variable" => "price",
                          ],
                      ],
                  ],
              ],
          ]);
      - 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
              .config(c -> c
                  .source(s -> s
                      .index("houses_sold_last_10_yrs")
                  )
                  .analysis(a -> a
                      .regression(r -> r
                          .dependentVariable("price")
                      )
                  )
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/datafeeds/{datafeed_id}/_preview":
    post:
      tags:
      - ml anomaly
      summary: 'Preview a datafeed

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/datafeeds/_preview</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_ml/datafeeds/_preview</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_ml/datafeeds/{datafeed_id}/_preview</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_ml/datafeeds/{datafeed_id}/_preview</span>\n
        \                     </div>\n                    \n\nThis 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.\n\n## Required
        authorization\n\n* Index privileges: `read`\n* Cluster privileges: `manage_ml`\n"
      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"
      requestBody:
        "$ref": "#/components/requestBodies/ml.preview_datafeed"
      responses:
        '200':
          "$ref": "#/components/responses/ml.preview_datafeed-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _ml/datafeeds/datafeed-high_sum_total_sales/_preview

          '
      - lang: Python
        source: |-
          resp = client.ml.preview_datafeed(
              datafeed_id="datafeed-high_sum_total_sales",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.previewDatafeed({
            datafeed_id: "datafeed-high_sum_total_sales",
          });
      - lang: Ruby
        source: |-
          response = client.ml.preview_datafeed(
            datafeed_id: "datafeed-high_sum_total_sales"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->previewDatafeed([
              "datafeed_id" => "datafeed-high_sum_total_sales",
          ]);
      - 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
              .datafeedId("datafeed-high_sum_total_sales")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/trained_models/{model_id}/definition/{part}":
    put:
      tags:
      - ml trained model
      summary: Create part of a trained model definition
      description: |2


        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-put-trained-model-definition-part
      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: path
        name: part
        description: |-
          The definition part number. When the definition is loaded for inference the definition parts are streamed in the
          order of their part number. The first part must be `0` and the final part must be `total_parts - 1`.
        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: |-
                  {
                      "definition": "...",
                      "total_definition_length": 265632637,
                      "total_parts": 64
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/definition/0
          {
              "definition": "...",
              "total_definition_length": 265632637,
              "total_parts": 64
          }
      - lang: Python
        source: |-
          resp = client.ml.put_trained_model_definition_part(
              model_id="elastic__distilbert-base-uncased-finetuned-conll03-english",
              part="0",
              definition="...",
              total_definition_length=265632637,
              total_parts=64,
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.putTrainedModelDefinitionPart({
            model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
            part: 0,
            definition: "...",
            total_definition_length: 265632637,
            total_parts: 64,
          });
      - lang: Ruby
        source: |-
          response = client.ml.put_trained_model_definition_part(
            model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
            part: "0",
            body: {
              "definition": "...",
              "total_definition_length": 265632637,
              "total_parts": 64
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->putTrainedModelDefinitionPart([
              "model_id" => "elastic__distilbert-base-uncased-finetuned-conll03-english",
              "part" => "0",
              "body" => [
                  "definition" => "...",
                  "total_definition_length" => 265632637,
                  "total_parts" => 64,
              ],
          ]);
      - 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
              .definition("...")
              .modelId("elastic__distilbert-base-uncased-finetuned-conll03-english")
              .part(0)
              .totalDefinitionLength(265632637L)
              .totalParts(64)
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_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.
        The vocabulary is stored in the index as described in `inference_config.*.vocabulary` of the trained model definition.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-put-trained-model-vocabulary
      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
      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
                  type: array
                  items:
                    type: string
                scores:
                  description: The optional vocabulary value scores if required by
                    the tokenizer.
                  x-state: Generally available
                  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: |-
                  {
                    "vocabulary": [
                      "[PAD]",
                      "[unused0]",
                    ]
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/vocabulary
          {
            "vocabulary": [
              "[PAD]",
              "[unused0]",
            ]
          }
      - lang: Python
        source: |-
          resp = client.ml.put_trained_model_vocabulary(
              model_id="elastic__distilbert-base-uncased-finetuned-conll03-english",
              vocabulary=[
                  "[PAD]",
                  "[unused0]"
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.putTrainedModelVocabulary({
            model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
            vocabulary: ["[PAD]", "[unused0]"],
          });
      - lang: Ruby
        source: |-
          response = client.ml.put_trained_model_vocabulary(
            model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
            body: {
              "vocabulary": [
                "[PAD]",
                "[unused0]"
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->putTrainedModelVocabulary([
              "model_id" => "elastic__distilbert-base-uncased-finetuned-conll03-english",
              "body" => [
                  "vocabulary" => array(
                      "[PAD]",
                      "[unused0]",
                  ),
              ],
          ]);
      - 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
              .modelId("elastic__distilbert-base-uncased-finetuned-conll03-english")
              .vocabulary(List.of("[PAD]","[unused0]"))
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_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
        it had just been created.
        It is not currently possible to reset multiple jobs using wildcards or a
        comma separated list.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-reset-job
      parameters:
      - 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
      - in: query
        name: wait_for_completion
        description: |-
          Should this request wait until the operation has completed before
          returning.
        deprecated: false
        schema:
          type: boolean
        style: form
      - in: query
        name: delete_user_annotations
        description: |-
          Specifies whether annotations that have been added by the
          user should be deleted along with any auto-generated annotations when the job is
          reset.
        deprecated: false
        schema:
          type: boolean
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'POST _ml/anomaly_detectors/total-requests/_reset

          '
      - lang: Python
        source: |-
          resp = client.ml.reset_job(
              job_id="total-requests",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.resetJob({
            job_id: "total-requests",
          });
      - lang: Ruby
        source: |-
          response = client.ml.reset_job(
            job_id: "total-requests"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->resetJob([
              "job_id" => "total-requests",
          ]);
      - 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
              .jobId("total-requests")
          );
      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
        throughout its lifecycle.
        If the destination index does not exist, it is created automatically the
        first time you start the data frame analytics job. The
        `index.number_of_shards` and `index.number_of_replicas` settings for the
        destination index are copied from the source index. If there are multiple
        source indices, the destination index copies the highest setting values. The
        mappings for the destination index are also copied from the source indices.
        If there are any mapping conflicts, the job fails to start.
        If the destination index exists, it is used as is. You can therefore set up
        the destination index in advance with custom settings and mappings.

        ## Required authorization

        * Index privileges: `create_index`,`index`,`manage`,`read`,`view_index_metadata`
        * Cluster privileges: `manage_ml`
      operationId: ml-start-data-frame-analytics
      parameters:
      - in: path
        name: id
        description: |-
          Identifier for the data frame analytics job. This identifier can contain
          lowercase alphanumeric characters (a-z and 0-9), hyphens, and
          underscores. It must start and end with alphanumeric characters.
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Id"
        style: simple
      - in: query
        name: timeout
        description: |-
          Controls the amount of time to wait until the data frame analytics job
          starts.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Duration"
        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
                    starts.
                  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.
                      The node ID of the node the job has been assigned to, or
                      an empty string if it hasn't been assigned to a node. In
                      serverless if the job has been assigned to run then the
                      node ID will be "serverless".
                    allOf:
                    - "$ref": "#/components/schemas/_types.NodeId"
                required:
                - acknowledged
                - node
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'POST _ml/data_frame/analytics/loganalytics/_start

          '
      - lang: Python
        source: |-
          resp = client.ml.start_data_frame_analytics(
              id="loganalytics",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.startDataFrameAnalytics({
            id: "loganalytics",
          });
      - lang: Ruby
        source: |-
          response = client.ml.start_data_frame_analytics(
            id: "loganalytics"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->startDataFrameAnalytics([
              "id" => "loganalytics",
          ]);
      - 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
              .id("loganalytics")
          );
      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
        multiple times throughout its lifecycle.

        Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs.

        If you restart a stopped datafeed, it continues processing input data from the next millisecond after it was stopped.
        If new data was indexed for that exact millisecond between stopping and starting, it will be ignored.

        When Elasticsearch security features are enabled, your datafeed remembers which roles the last user to create or
        update it had at the time of creation or update and runs the query using those same roles. If you provided secondary
        authorization headers when you created or updated the datafeed, those credentials are used instead.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      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
          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: end
        description: |-
          The time that the datafeed should end, which can be specified by using one of the following formats:

          * ISO 8601 format with milliseconds, for example `2017-01-22T06:00:00.000Z`
          * ISO 8601 format without milliseconds, for example `2017-01-22T06:00:00+00:00`
          * Milliseconds since the epoch, for example `1485061200000`

          Date-time arguments using either of the ISO 8601 formats must have a time zone designator, where `Z` is accepted
          as an abbreviation for UTC time. When a URL is expected (for example, in browsers), the `+` used in time zone
          designators must be encoded as `%2B`.
          The end time value is exclusive. If you do not specify an end time, the datafeed
          runs continuously.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.DateTime"
        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.
          This value is inclusive.
          If you do not specify a start time and the datafeed is associated with a new anomaly detection job, the analysis
          starts from the earliest time for which data is available.
          If you restart a stopped datafeed and specify a start value that is earlier than the timestamp of the latest
          processed record, the datafeed continues from 1 millisecond after the timestamp of the latest processed record.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.DateTime"
        style: form
      - in: query
        name: timeout
        description: Specifies the amount of time to wait until a datafeed starts.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Duration"
        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: |-
                  {
                    "start": "2019-04-07T18:22:16Z"
                  }
      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".
                      If 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
      x-codeSamples:
      - lang: Console
        source: |-
          POST _ml/datafeeds/datafeed-low_request_rate/_start
          {
            "start": "2019-04-07T18:22:16Z"
          }
      - lang: Python
        source: |-
          resp = client.ml.start_datafeed(
              datafeed_id="datafeed-low_request_rate",
              start="2019-04-07T18:22:16Z",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.startDatafeed({
            datafeed_id: "datafeed-low_request_rate",
            start: "2019-04-07T18:22:16Z",
          });
      - lang: Ruby
        source: |-
          response = client.ml.start_datafeed(
            datafeed_id: "datafeed-low_request_rate",
            body: {
              "start": "2019-04-07T18:22:16Z"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->startDatafeed([
              "datafeed_id" => "datafeed-low_request_rate",
              "body" => [
                  "start" => "2019-04-07T18:22:16Z",
              ],
          ]);
      - 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
              .datafeedId("datafeed-low_request_rate")
              .start(DateTime.of("2019-04-07T18:22:16Z"))
          );
      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.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      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"
        style: simple
      - in: query
        name: cache_size
        description: |-
          The inference cache size (in memory outside the JVM heap) per node for the model.
          The default value is the same size as the `model_size_bytes`. To disable the cache,
          `0b` can be provided.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.ByteSize"
        style: form
      - in: query
        name: number_of_allocations
        description: |-
          The number of model allocations on each node where the model is deployed.
          All allocations on a node share the same copy of the model in memory but use
          a separate set of threads to evaluate the model.
          Increasing this value generally increases the throughput.
          If this setting is greater than the number of hardware threads
          it will automatically be changed to a value less than the number of hardware threads.
          If 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
          this 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
          the inference speed. The inference process is a compute-bound process; any number
          greater than the number of available hardware threads on the machine does not increase the
          inference speed. If this setting is greater than the number of hardware threads
          it will automatically be changed to a value less than the number of hardware threads.
        deprecated: false
        schema:
          type: number
        style: form
      - 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"
        style: form
      - in: query
        name: wait_for
        description: |+
          Specifies the allocation status to wait for before returning.

          Supported values include:
            - `started`: The trained model is started on at least one node.
            - `starting`: Trained model deployment is starting but it is not yet deployed on any nodes.
            - `fully_allocated`: Trained model deployment has started on all valid nodes.

        deprecated: false
        schema:
          "$ref": "#/components/schemas/ml._types.DeploymentAllocationState"
        style: form
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                adaptive_allocations:
                  description: |-
                    Adaptive allocations configuration. When enabled, the number of allocations
                    is set based on the current load.
                    If adaptive_allocations is enabled, do not set the number of allocations manually.
                  allOf:
                  - "$ref": "#/components/schemas/ml._types.AdaptiveAllocationsSettings"
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  assignment:
                    allOf:
                    - "$ref": "#/components/schemas/ml._types.TrainedModelAssignment"
                required:
                - assignment
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'POST _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/_start?wait_for=started&timeout=1m

          '
      - lang: Python
        source: |-
          resp = client.ml.start_trained_model_deployment(
              model_id="elastic__distilbert-base-uncased-finetuned-conll03-english",
              wait_for="started",
              timeout="1m",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.startTrainedModelDeployment({
            model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
            wait_for: "started",
            timeout: "1m",
          });
      - lang: Ruby
        source: |-
          response = client.ml.start_trained_model_deployment(
            model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
            wait_for: "started",
            timeout: "1m"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->startTrainedModelDeployment([
              "model_id" => "elastic__distilbert-base-uncased-finetuned-conll03-english",
              "wait_for" => "started",
              "timeout" => "1m",
          ]);
      - 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
              .modelId("elastic__distilbert-base-uncased-finetuned-conll03-english")
              .timeout(t -> t
                  .offset(1)
              )
              .waitFor(DeploymentAllocationState.Started)
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_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
        throughout its lifecycle.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-stop-data-frame-analytics
      parameters:
      - in: path
        name: id
        description: |-
          Identifier for the data frame analytics job. This identifier can contain
          lowercase alphanumeric characters (a-z and 0-9), hyphens, and
          underscores. It must start and end with alphanumeric characters.
        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:

          1. Contains wildcard expressions and there are no data frame analytics
          jobs that match.
          2. Contains the _all string or no identifiers and there are no matches.
          3. Contains wildcard expressions and there are only partial matches.

          The default value is true, which returns an empty data_frame_analytics
          array when there are no matches and the subset of results when there are
          partial matches. If this parameter is false, the request returns a 404
          status code when there are no matches or only partial matches.
        deprecated: false
        schema:
          type: boolean
        style: form
      - in: query
        name: force
        description: If true, the data frame analytics job is stopped forcefully.
        deprecated: false
        schema:
          type: boolean
        style: form
      - in: query
        name: timeout
        description: |-
          Controls the amount of time to wait until the data frame analytics job
          stops. Defaults to 20 seconds.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Duration"
        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"
                allow_no_match:
                  description: |-
                    Specifies what to do when the request:

                    1. Contains wildcard expressions and there are no data frame analytics
                    jobs that match.
                    2. Contains the _all string or no identifiers and there are no matches.
                    3. Contains wildcard expressions and there are only partial matches.

                    The default value is true, which returns an empty data_frame_analytics
                    array when there are no matches and the subset of results when there are
                    partial matches. If this parameter is false, the request returns a 404
                    status code when there are no matches or only partial matches.
                  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
                    stops. Defaults to 20 seconds.
                  default: 20s
                  allOf:
                  - "$ref": "#/components/schemas/_types.Duration"
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  stopped:
                    type: boolean
                required:
                - stopped
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'POST _ml/data_frame/analytics/loganalytics/_stop

          '
      - lang: Python
        source: |-
          resp = client.ml.stop_data_frame_analytics(
              id="loganalytics",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.stopDataFrameAnalytics({
            id: "loganalytics",
          });
      - lang: Ruby
        source: |-
          response = client.ml.stop_data_frame_analytics(
            id: "loganalytics"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->stopDataFrameAnalytics([
              "id" => "loganalytics",
          ]);
      - 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
              .id("loganalytics")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_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
        multiple times throughout its lifecycle.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-stop-datafeed
      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
          list of datafeeds or a wildcard expression. You can close all datafeeds by using `_all` or by specifying `*` as
          the identifier.
        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:

          * Contains wildcard expressions and there are no datafeeds that match.
          * Contains the `_all` string or no identifiers and there are no matches.
          * Contains wildcard expressions and there are only partial matches.

          If `true`, the API returns an empty datafeeds array when there are no matches and the subset of results when
          there are partial matches. If `false`, the API returns a 404 status code when there are no matches or only
          partial matches.
        deprecated: false
        schema:
          type: boolean
        style: form
      - in: query
        name: force
        description: If `true`, the datafeed is stopped forcefully.
        deprecated: false
        schema:
          type: boolean
        style: form
      - 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
      - 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
            examples:
              MlStopDatafeedExample1:
                description: An example body for a `POST _ml/datafeeds/datafeed-low_request_rate/_stop`
                  request.
                value: |-
                  {
                    "timeout": "30s"
                  }
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  stopped:
                    type: boolean
                required:
                - stopped
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _ml/datafeeds/datafeed-low_request_rate/_stop
          {
            "timeout": "30s"
          }
      - lang: Python
        source: |-
          resp = client.ml.stop_datafeed(
              datafeed_id="datafeed-low_request_rate",
              timeout="30s",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.stopDatafeed({
            datafeed_id: "datafeed-low_request_rate",
            timeout: "30s",
          });
      - lang: Ruby
        source: |-
          response = client.ml.stop_datafeed(
            datafeed_id: "datafeed-low_request_rate",
            body: {
              "timeout": "30s"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->stopDatafeed([
              "datafeed_id" => "datafeed-low_request_rate",
              "body" => [
                  "timeout" => "30s",
              ],
          ]);
      - 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
              .datafeedId("datafeed-low_request_rate")
              .timeout(t -> t
                  .time("30s")
              )
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/trained_models/{model_id}/deployment/_stop":
    post:
      tags:
      - ml trained model
      summary: Stop a trained model deployment
      description: |2


        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-stop-trained-model-deployment
      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: allow_no_match
        description: |-
          Specifies what to do when the request: contains wildcard expressions and there are no deployments that match;
          contains the  `_all` string or no identifiers and there are no matches; or contains wildcard expressions and
          there are only partial matches. By default, it returns an empty array when there are no matches and the subset of results when there are partial matches.
          If `false`, the request returns a 404 status code when there are no matches or only partial matches.
        deprecated: false
        schema:
          type: boolean
        style: form
      - 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
          restart the model deployment.
        deprecated: false
        schema:
          type: boolean
        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"
                allow_no_match:
                  description: |-
                    Specifies what to do when the request: contains wildcard expressions and there are no deployments that match;
                    contains the  `_all` string or no identifiers and there are no matches; or contains wildcard expressions and
                    there are only partial matches. By default, it returns an empty array when there are no matches and the subset of results when there are partial matches.
                    If `false`, the request returns a 404 status code when there are no matches or only partial matches.
                  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
                    restart the model deployment.
                  default: false
                  type: boolean
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  stopped:
                    type: boolean
                required:
                - stopped
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'POST _ml/trained_models/my_model_for_search/deployment/_stop

          '
      - lang: Python
        source: |-
          resp = client.ml.stop_trained_model_deployment(
              model_id="my_model_for_search",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.stopTrainedModelDeployment({
            model_id: "my_model_for_search",
          });
      - lang: Ruby
        source: |-
          response = client.ml.stop_trained_model_deployment(
            model_id: "my_model_for_search"
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->stopTrainedModelDeployment([
              "model_id" => "my_model_for_search",
          ]);
      - 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
              .modelId("my_model_for_search")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/data_frame/analytics/{id}/_update":
    post:
      tags:
      - ml data frame
      summary: Update a data frame analytics job
      description: |2


        ## Required authorization

        * Index privileges: `read`,`create_index`,`manage`,`index`,`view_index_metadata`
        * Cluster privileges: `manage_ml`
      operationId: ml-update-data-frame-analytics
      parameters:
      - in: path
        name: id
        description: |-
          Identifier for the data frame analytics job. This identifier can contain
          lowercase alphanumeric characters (a-z and 0-9), hyphens, and
          underscores. It must start and end with alphanumeric characters.
        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 job.
                  type: string
                model_memory_limit:
                  description: |-
                    The approximate maximum amount of memory resources that are permitted for
                    analytical processing. If your `elasticsearch.yml` file contains an
                    `xpack.ml.max_model_memory_limit` setting, an error occurs when you try
                    to create data frame analytics jobs that have `model_memory_limit` values
                    greater than that setting.
                  default: 1gb
                  type: string
                max_num_threads:
                  description: |-
                    The maximum number of threads to be used by the analysis. Using more
                    threads may decrease the time necessary to complete the analysis at the
                    cost of using more CPU. Note that the process may use additional threads
                    for operational functionality other than the analysis itself.
                  default: 1
                  type: number
                allow_lazy_start:
                  description: |-
                    Specifies whether this job can start when there is insufficient machine
                    learning node capacity for it to be immediately assigned to a node.
                  default: false
                  type: boolean
            examples:
              MlUpdateDataFrameAnalyticsExample1:
                description: An example body for a `POST _ml/data_frame/analytics/loganalytics/_update`
                  request.
                value: |-
                  {
                    "model_memory_limit": "200mb"
                  }
        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
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _ml/data_frame/analytics/loganalytics/_update
          {
            "model_memory_limit": "200mb"
          }
      - lang: Python
        source: |-
          resp = client.ml.update_data_frame_analytics(
              id="loganalytics",
              model_memory_limit="200mb",
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.updateDataFrameAnalytics({
            id: "loganalytics",
            model_memory_limit: "200mb",
          });
      - lang: Ruby
        source: |-
          response = client.ml.update_data_frame_analytics(
            id: "loganalytics",
            body: {
              "model_memory_limit": "200mb"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->updateDataFrameAnalytics([
              "id" => "loganalytics",
              "body" => [
                  "model_memory_limit" => "200mb",
              ],
          ]);
      - 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
              .id("loganalytics")
              .modelMemoryLimit("200mb")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_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.
        When Elasticsearch security features are enabled, your datafeed remembers which roles the user who updated it had at
        the time of the update and runs the query using those same roles. If you provide secondary authorization headers,
        those credentials are used instead.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-update-datafeed
      parameters:
      - in: path
        name: 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.
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Id"
        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` string or when no indices are specified.
        deprecated: false
        schema:
          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
          whether wildcard expressions match hidden data streams. Supports comma-separated values.

          Supported values include:
            - `all`: Match any data stream or index, including hidden ones.
            - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
            - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
            - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
            - `none`: Wildcard expressions are not accepted.

        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:
                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"
                chunking_config:
                  description: |-
                    Datafeeds might search over long time periods, for several months or years. This search is split into time
                    chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of
                    these time chunks are calculated; it is an advanced configuration option.
                  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
                    search over indices that have already been read in an effort to determine whether any data has subsequently been
                    added to the index. If missing data is found, it is a good indication that the `query_delay` is set too low and
                    the data is being indexed after the datafeed has passed that moment in time. This check runs only on real-time
                    datafeeds.
                  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
                    either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket
                    span. When `frequency` is shorter than the bucket span, interim results for the last (partial) bucket are
                    written then eventually overwritten by the full bucket results. If the datafeed uses aggregations, this value
                    must be divisible by the interval of the date histogram aggregation.
                  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
                    learning 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
                    stops and closes the associated job after this many real-time searches return no documents. In other words,
                    it stops after `frequency` times `max_empty_searches` of real-time operation. If not set, a datafeed with no
                    end time that sees no data remains started until it is explicitly stopped. By default, it is not set.
                  type: number
                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. Note that if you change the query, the analyzed data is also
                    changed. Therefore, the time required to learn might be long and the understandability of the results is
                    unpredictable. If you want to make significant changes to the source data, it is recommended that you
                    clone the job and datafeed and make the amendments in the clone. Let both run in parallel and close one
                    when you are satisfied with the results of the job.
                  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
                    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"
                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`.
                  default: 1000
                  type: number
            examples:
              MlUpdateDatafeedExample1:
                description: An example body for a `POST _ml/datafeeds/datafeed-test-job/_update`
                  request.
                value: |-
                  {
                    "query": {
                      "term": {
                        "geo.src": "US"
                      }
                    }
                  }
        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
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _ml/datafeeds/datafeed-test-job/_update
          {
            "query": {
              "term": {
                "geo.src": "US"
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.ml.update_datafeed(
              datafeed_id="datafeed-test-job",
              query={
                  "term": {
                      "geo.src": "US"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.updateDatafeed({
            datafeed_id: "datafeed-test-job",
            query: {
              term: {
                "geo.src": "US",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.ml.update_datafeed(
            datafeed_id: "datafeed-test-job",
            body: {
              "query": {
                "term": {
                  "geo.src": "US"
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->updateDatafeed([
              "datafeed_id" => "datafeed-test-job",
              "body" => [
                  "query" => [
                      "term" => [
                          "geo.src" => "US",
                      ],
                  ],
              ],
          ]);
      - 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
              .datafeedId("datafeed-test-job")
              .query(q -> q
                  .term(t -> t
                      .field("geo.src")
                      .value(FieldValue.of("US"))
                  )
              )
          );
      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.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      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"
        style: simple
      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
            examples:
              MlUpdateFilterExample1:
                description: An example body for a `POST _ml/filters/safe_domains/_update`
                  request.
                value: |-
                  {
                    "description": "Updated list of domains",
                    "add_items": ["*.myorg.com"],
                    "remove_items": ["wikipedia.org"]
                  }
        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
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _ml/filters/safe_domains/_update
          {
            "description": "Updated list of domains",
            "add_items": ["*.myorg.com"],
            "remove_items": ["wikipedia.org"]
          }
      - lang: Python
        source: |-
          resp = client.ml.update_filter(
              filter_id="safe_domains",
              description="Updated list of domains",
              add_items=[
                  "*.myorg.com"
              ],
              remove_items=[
                  "wikipedia.org"
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.updateFilter({
            filter_id: "safe_domains",
            description: "Updated list of domains",
            add_items: ["*.myorg.com"],
            remove_items: ["wikipedia.org"],
          });
      - lang: Ruby
        source: |-
          response = client.ml.update_filter(
            filter_id: "safe_domains",
            body: {
              "description": "Updated list of domains",
              "add_items": [
                "*.myorg.com"
              ],
              "remove_items": [
                "wikipedia.org"
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->updateFilter([
              "filter_id" => "safe_domains",
              "body" => [
                  "description" => "Updated list of domains",
                  "add_items" => array(
                      "*.myorg.com",
                  ),
                  "remove_items" => array(
                      "wikipedia.org",
                  ),
              ],
          ]);
      - 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
              .addItems("*.myorg.com")
              .description("Updated list of domains")
              .filterId("safe_domains")
              .removeItems("wikipedia.org")
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_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.

        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-update-job
      parameters:
      - 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
                    there is insufficient machine learning node capacity for it to be
                    immediately assigned to a node. If `false` and a machine learning node
                    with capacity to run the job cannot immediately be found, the open
                    anomaly detection jobs API returns an error. However, this is also
                    subject to the cluster-wide `xpack.ml.max_lazy_ml_nodes` setting. If this
                    option is set to `true`, the open anomaly detection jobs API does not
                    return an error and the job waits in the opening state until sufficient
                    machine learning node capacity is available.
                  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
                    of the model.
                    The default value is a randomized value between 3 to 4 hours, which
                    avoids all jobs persisting at exactly the same time. The smallest allowed
                    value is 1 hour.
                    For very large models (several GB), persistence could take 10-20 minutes,
                    so do not set the value too low.
                    If the job is open when you make the update, you must stop the datafeed,
                    close the job, then reopen the job and restart the datafeed for the
                    changes to take effect.
                  allOf:
                  - "$ref": "#/components/schemas/_types.Duration"
                custom_settings:
                  description: |-
                    Advanced configuration option. Contains custom meta data about the job.
                    For example, it can contain custom URL information as shown in Adding
                    custom URLs to machine learning results.
                  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
                    model snapshots for this job. It specifies a period of time (in days)
                    after which only the first snapshot per day is retained. This period is
                    relative to the timestamp of the most recent snapshot for this job. Valid
                    values range from 0 to `model_snapshot_retention_days`. For jobs created
                    before version 7.8.0, the default value matches
                    `model_snapshot_retention_days`.
                  default: 1
                  type: number
                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.
                  default: 10
                  type: number
                renormalization_window_days:
                  description: |-
                    Advanced configuration option. The period over which adjustments to the
                    score are applied, as new data is seen.
                  type: number
                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.
                  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"
            examples:
              MlUpdateJobExample1:
                description: An example body for a `POST _ml/anomaly_detectors/low_request_rate/_update`
                  request.
                value: |-
                  {
                    "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
                  }
        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
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _ml/anomaly_detectors/low_request_rate/_update
          {
            "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
          }
      - lang: Python
        source: |-
          resp = client.ml.update_job(
              job_id="low_request_rate",
              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,
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.updateJob({
            job_id: "low_request_rate",
            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,
          });
      - lang: Ruby
        source: |-
          response = client.ml.update_job(
            job_id: "low_request_rate",
            body: {
              "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
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->updateJob([
              "job_id" => "low_request_rate",
              "body" => [
                  "description" => "An updated job",
                  "detectors" => [
                      "detector_index" => 0,
                      "description" => "An updated detector description",
                  ],
                  "groups" => array(
                      "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,
              ],
          ]);
      - 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
              .backgroundPersistInterval(b -> b
                  .time("2h")
              )
              .description("An updated job")
              .detectors(d -> d
                  .detectorIndex(0)
                  .description("An updated detector description")
              )
              .groups(List.of("kibana_sample_data","kibana_sample_web_logs"))
              .jobId("low_request_rate")
              .modelPlotConfig(m -> m
                  .enabled(true)
              )
              .modelSnapshotRetentionDays(7L)
              .renormalizationWindowDays(30L)
              .resultsRetentionDays(60L)
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/_ml/trained_models/{model_id}/deployment/_update":
    post:
      tags:
      - ml trained model
      summary: Update a trained model deployment
      description: |2


        ## Required authorization

        * Cluster privileges: `manage_ml`
      operationId: ml-update-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"
        style: simple
      - in: query
        name: number_of_allocations
        description: |-
          The number of model allocations on each node where the model is deployed.
          All allocations on a node share the same copy of the model in memory but use
          a separate set of threads to evaluate the model.
          Increasing this value generally increases the throughput.
          If this setting is greater than the number of hardware threads
          it will automatically be changed to a value less than the number of hardware threads.
        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.
                    All allocations on a node share the same copy of the model in memory but use
                    a separate set of threads to evaluate the model.
                    Increasing this value generally increases the throughput.
                    If this setting is greater than the number of hardware threads
                    it will automatically be changed to a value less than the number of hardware threads.
                    If adaptive_allocations is enabled, do not set this value, because it’s automatically set.
                  default: 1
                  type: number
                adaptive_allocations:
                  description: |-
                    Adaptive allocations configuration. When enabled, the number of allocations
                    is set based on the current load.
                    If 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: |-
                  {
                    "number_of_allocations": 4
                  }
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  assignment:
                    allOf:
                    - "$ref": "#/components/schemas/ml._types.TrainedModelAssignment"
                required:
                - assignment
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: |-
          POST _ml/trained_models/elastic__distilbert-base-uncased-finetuned-conll03-english/deployment/_update
          {
            "number_of_allocations": 4
          }
      - lang: Python
        source: |-
          resp = client.ml.update_trained_model_deployment(
              model_id="elastic__distilbert-base-uncased-finetuned-conll03-english",
              number_of_allocations=4,
          )
      - lang: JavaScript
        source: |-
          const response = await client.ml.updateTrainedModelDeployment({
            model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
            number_of_allocations: 4,
          });
      - lang: Ruby
        source: |-
          response = client.ml.update_trained_model_deployment(
            model_id: "elastic__distilbert-base-uncased-finetuned-conll03-english",
            body: {
              "number_of_allocations": 4
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->ml()->updateTrainedModelDeployment([
              "model_id" => "elastic__distilbert-base-uncased-finetuned-conll03-english",
              "body" => [
                  "number_of_allocations" => 4,
              ],
          ]);
      - 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
              .modelId("elastic__distilbert-base-uncased-finetuned-conll03-english")
              .numberOfAllocations(4)
          );
      x-metaTags:
      - content: Elasticsearch, Machine Learning
        name: product_name
  "/{index}/_msearch":
    post:
      tags:
      - search
      summary: 'Run multiple searches

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_msearch</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_msearch</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_msearch</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_msearch</span>\n
        \                     </div>\n                    \n\nThe 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`.\n\n## Required authorization\n\n*
        Index privileges: `read`\n"
      operationId: msearch
      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-index_"
      - "$ref": "#/components/parameters/msearch-max_concurrent_searches"
      - "$ref": "#/components/parameters/msearch-max_concurrent_shard_requests"
      - "$ref": "#/components/parameters/msearch-pre_filter_shard_size"
      - "$ref": "#/components/parameters/msearch-rest_total_hits_as_int"
      - "$ref": "#/components/parameters/msearch-routing"
      - "$ref": "#/components/parameters/msearch-search_type"
      - "$ref": "#/components/parameters/msearch-typed_keys"
      requestBody:
        "$ref": "#/components/requestBodies/msearch"
      responses:
        '200':
          "$ref": "#/components/responses/msearch-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          GET my-index-000001/_msearch
          { }
          {"query" : {"match" : { "message": "this is a test"}}}
          {"index": "my-index-000002"}
          {"query" : {"match_all" : {}}}
      - lang: Python
        source: |-
          resp = client.msearch(
              index="my-index-000001",
              searches=[
                  {},
                  {
                      "query": {
                          "match": {
                              "message": "this is a test"
                          }
                      }
                  },
                  {
                      "index": "my-index-000002"
                  },
                  {
                      "query": {
                          "match_all": {}
                      }
                  }
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.msearch({
            index: "my-index-000001",
            searches: [
              {},
              {
                query: {
                  match: {
                    message: "this is a test",
                  },
                },
              },
              {
                index: "my-index-000002",
              },
              {
                query: {
                  match_all: {},
                },
              },
            ],
          });
      - lang: Ruby
        source: |-
          response = client.msearch(
            index: "my-index-000001",
            body: [
              {},
              {
                "query": {
                  "match": {
                    "message": "this is a test"
                  }
                }
              },
              {
                "index": "my-index-000002"
              },
              {
                "query": {
                  "match_all": {}
                }
              }
            ]
          )
      - lang: PHP
        source: |-
          $resp = $client->msearch([
              "index" => "my-index-000001",
              "body" => array(
                  new ArrayObject([]),
                  [
                      "query" => [
                          "match" => [
                              "message" => "this is a test",
                          ],
                      ],
                  ],
                  [
                      "index" => "my-index-000002",
                  ],
                  [
                      "query" => [
                          "match_all" => new ArrayObject([]),
                      ],
                  ],
              ),
          ]);
      - 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
        name: product_name
  "/{index}/_msearch/template":
    post:
      tags:
      - search
      summary: 'Run multiple templated searches

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_msearch/template</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_msearch/template</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_msearch/template</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_msearch/template</span>\n
        \                     </div>\n                    \n\nRun 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```\n\n## Required authorization\n\n* Index
        privileges: `read`\n"
      externalDocs:
        url: https://www.elastic.co/docs/solutions/search/search-templates
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/multi-search-template.html
      operationId: msearch-template
      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"
      requestBody:
        "$ref": "#/components/requestBodies/msearch_template"
      responses:
        '200':
          "$ref": "#/components/responses/msearch_template-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          GET my-index/_msearch/template
          { }
          { "id": "my-search-template", "params": { "query_string": "hello world", "from": 0, "size": 10 }}
          { }
          { "id": "my-other-search-template", "params": { "query_type": "match_all" }}
      - lang: Python
        source: |-
          resp = client.msearch_template(
              index="my-index",
              search_templates=[
                  {},
                  {
                      "id": "my-search-template",
                      "params": {
                          "query_string": "hello world",
                          "from": 0,
                          "size": 10
                      }
                  },
                  {},
                  {
                      "id": "my-other-search-template",
                      "params": {
                          "query_type": "match_all"
                      }
                  }
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.msearchTemplate({
            index: "my-index",
            search_templates: [
              {},
              {
                id: "my-search-template",
                params: {
                  query_string: "hello world",
                  from: 0,
                  size: 10,
                },
              },
              {},
              {
                id: "my-other-search-template",
                params: {
                  query_type: "match_all",
                },
              },
            ],
          });
      - lang: Ruby
        source: |-
          response = client.msearch_template(
            index: "my-index",
            body: [
              {},
              {
                "id": "my-search-template",
                "params": {
                  "query_string": "hello world",
                  "from": 0,
                  "size": 10
                }
              },
              {},
              {
                "id": "my-other-search-template",
                "params": {
                  "query_type": "match_all"
                }
              }
            ]
          )
      - lang: PHP
        source: |-
          $resp = $client->msearchTemplate([
              "index" => "my-index",
              "body" => array(
                  new ArrayObject([]),
                  [
                      "id" => "my-search-template",
                      "params" => [
                          "query_string" => "hello world",
                          "from" => 0,
                          "size" => 10,
                      ],
                  ],
                  new ArrayObject([]),
                  [
                      "id" => "my-other-search-template",
                      "params" => [
                          "query_type" => "match_all",
                      ],
                  ],
              ),
          ]);
      - 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
        name: product_name
  "/{index}/_mtermvectors":
    post:
      tags:
      - document
      summary: 'Get multiple term vectors

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_mtermvectors</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_mtermvectors</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_mtermvectors</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_mtermvectors</span>\n
        \                     </div>\n                    \n\nGet 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`.\n\n##
        Required authorization\n\n* Index privileges: `read`\n"
      operationId: mtermvectors
      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-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST /my-index-000001/_mtermvectors
          {
            "docs": [
                {
                  "_id": "2",
                  "fields": [
                      "message"
                  ],
                  "term_statistics": true
                },
                {
                  "_id": "1"
                }
            ]
          }
      - lang: Python
        source: |-
          resp = client.mtermvectors(
              index="my-index-000001",
              docs=[
                  {
                      "_id": "2",
                      "fields": [
                          "message"
                      ],
                      "term_statistics": True
                  },
                  {
                      "_id": "1"
                  }
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.mtermvectors({
            index: "my-index-000001",
            docs: [
              {
                _id: "2",
                fields: ["message"],
                term_statistics: true,
              },
              {
                _id: "1",
              },
            ],
          });
      - lang: Ruby
        source: |-
          response = client.mtermvectors(
            index: "my-index-000001",
            body: {
              "docs": [
                {
                  "_id": "2",
                  "fields": [
                    "message"
                  ],
                  "term_statistics": true
                },
                {
                  "_id": "1"
                }
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->mtermvectors([
              "index" => "my-index-000001",
              "body" => [
                  "docs" => array(
                      [
                          "_id" => "2",
                          "fields" => array(
                              "message",
                          ),
                          "term_statistics" => true,
                      ],
                      [
                          "_id" => "1",
                      ],
                  ),
              ],
          ]);
      - 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
              .docs(List.of(MultiTermVectorsOperation.of(mu -> mu
                      .id("2")
                      .fields("message")
                      .termStatistics(true)
                  ),MultiTermVectorsOperation.of(mu -> mu
                      .id("1")
                  )))
              .index("my-index-000001")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{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,
        which is called point in time. Elasticsearch pit (point in time) is a lightweight view into the
        state of the data as it existed when initiated. In some cases, it’s preferred to perform multiple
        search requests using the same point in time. For example, if refreshes happen between
        `search_after` requests, then the results of those requests might not be consistent as changes happening
        between searches are only visible to the more recent point in time.

        A point in time must be opened explicitly before being used in search requests.

        A subsequent search request with the `pit` parameter must not specify `index`, `routing`, or `preference` values as these parameters are copied from the point in time.

        Just like regular searches, you can use `from` and `size` to page through point in time search results, up to the first 10,000 hits.
        If you want to retrieve more hits, use PIT with `search_after`.

        IMPORTANT: The open point in time request and each subsequent search request can return different identifiers; always use the most recently received ID for the next search request.

        When a PIT that contains shard failures is used in a search request, the missing are always reported in the search response as a `NoShardAvailableActionException` exception.
        To get rid of these exceptions, a new PIT needs to be created so that shards missing from the previous PIT can be handled, assuming they become available in the meantime.

        **Keeping point in time alive**

        The `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.
        The value does not need to be long enough to process all data — it just needs to be long enough for the next request.

        Normally, the background merge process optimizes the index by merging together smaller segments to create new, bigger segments.
        Once the smaller segments are no longer needed they are deleted.
        However, open point-in-times prevent the old segments from being deleted since they are still in use.

        TIP: Keeping older segments alive means that more disk space and file handles are needed.
        Ensure that you have configured your nodes to have ample free file handles.

        Additionally, 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.
        Ensure 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.
        Note that a point-in-time doesn't prevent its associated indices from being deleted.
        You can check how many point-in-times (that is, search contexts) are open with the nodes stats API.

        ## Required authorization

        * Index privileges: `read`
      operationId: open-point-in-time
      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
        required: true
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Indices"
        style: simple
      - 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.
        deprecated: false
        schema:
          type: boolean
        style: form
      - in: query
        name: preference
        description: |-
          The node or shard the operation should be performed on.
          By 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.
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Routing"
        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.
          It supports comma-separated values, such as `open,hidden`.

          Supported values include:
            - `all`: Match any data stream or index, including hidden ones.
            - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
            - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
            - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
            - `none`: Wildcard expressions are not accepted.

        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.ExpandWildcards"
        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.
          If `false`, creating a point in time request when a shard is missing or unavailable will throw an exception.
          If `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
      - 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"
      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.

                    '
                  value: |-
                    {
                      "id": "46ToAwMDaWR5BXV1aWQyKwZub2RlXzMAAAAAAAAAACoBYwADaWR4BXV1aWQxAgZub2RlXzEAAAAAAAAAAAEBYQADaWR5BXV1aWQyKgZub2RlXzIAAAAAAAAAAAwBYgACBXV1aWQyAAAFdXVpZDEAAQltYXRjaF9hbGw_gAAAAA=",
                      "_shards": {
                        "total": 10,
                        "successful": 10,
                        "skipped": 0,
                        "failed": 0
                      }
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'POST /my-index-000001/_pit?keep_alive=1m&allow_partial_search_results=true

          '
      - lang: Python
        source: |-
          resp = client.open_point_in_time(
              index="my-index-000001",
              keep_alive="1m",
              allow_partial_search_results=True,
          )
      - lang: JavaScript
        source: |-
          const response = await client.openPointInTime({
            index: "my-index-000001",
            keep_alive: "1m",
            allow_partial_search_results: "true",
          });
      - lang: Ruby
        source: |-
          response = client.open_point_in_time(
            index: "my-index-000001",
            keep_alive: "1m",
            allow_partial_search_results: "true"
          )
      - lang: PHP
        source: |-
          $resp = $client->openPointInTime([
              "index" => "my-index-000001",
              "keep_alive" => "1m",
              "allow_partial_search_results" => "true",
          ]);
      - 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
              .allowPartialSearchResults(true)
              .index("my-index-000001")
              .keepAlive(k -> k
                  .offset(1)
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_project_routing":
    get:
      tags:
      - project
      summary: Get project routing expressions
      description: |2


        ## Required authorization

        * Cluster privileges: `monitor`
      operationId: project-get-many-routing
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/project._types.NamedProjectRoutingExpressions"
              examples:
                GetProjectResponseExample1:
                  summary: Multiple expressions
                  value: |-
                    {
                     "aws-us-only": { "expression": "_csp:aws AND _region:us*" },
                     "aws-eu-only": { "expression": "_csp:aws AND _region:eu*" }
                    }
      x-state: Technical preview
      x-codeSamples:
      - lang: Console
        source: 'GET /_project_routing/

          '
      - lang: Python
        source: resp = client.project.get_many_routing()
      - lang: JavaScript
        source: const response = await client.project.getManyRouting();
      - lang: Ruby
        source: response = client.project.get_many_routing
      - lang: PHP
        source: "$resp = $client->project()->getManyRouting();"
      - lang: curl
        source: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_project_routing/"'
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    put:
      tags:
      - project
      summary: Create or update project routing expressions
      description: |2


        ## Required authorization

        * Cluster privileges: `manage`
      operationId: project-create-many-routing
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/project._types.NamedProjectRoutingExpressions"
            examples:
              CreateProjectRoutingRequestExample1:
                summary: Multiple expressions
                value: |-
                  {
                   "aws-us-only": { "expression": "_csp:aws AND _region:us*" },
                   "aws-eu-only": { "expression": "_csp:aws AND _region:eu*" }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
              examples:
                CreateProjectResponseExample1:
                  summary: Multiple expressions
                  value: |-
                    {
                      "acknowledged": true
                    }
      x-state: Technical preview
      x-codeSamples:
      - lang: Console
        source: |-
          PUT /_project_routing/
          {
           "aws-us-only": { "expression": "_csp:aws AND _region:us*" },
           "aws-eu-only": { "expression": "_csp:aws AND _region:eu*" }
          }
      - lang: Python
        source: |-
          resp = client.project.create_many_routing(
              expressions={
                  "aws-us-only": {
                      "expression": "_csp:aws AND _region:us*"
                  },
                  "aws-eu-only": {
                      "expression": "_csp:aws AND _region:eu*"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.project.createManyRouting({
            expressions: {
              "aws-us-only": {
                expression: "_csp:aws AND _region:us*",
              },
              "aws-eu-only": {
                expression: "_csp:aws AND _region:eu*",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.project.create_many_routing(
            body: {
              "aws-us-only": {
                "expression": "_csp:aws AND _region:us*"
              },
              "aws-eu-only": {
                "expression": "_csp:aws AND _region:eu*"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->project()->createManyRouting([
              "body" => [
                  "aws-us-only" => [
                      "expression" => "_csp:aws AND _region:us*",
                  ],
                  "aws-eu-only" => [
                      "expression" => "_csp:aws AND _region:eu*",
                  ],
              ],
          ]);
      - lang: curl
        source: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type:
          application/json" -d ''{"aws-us-only":{"expression":"_csp:aws AND _region:us*"},"aws-eu-only":{"expression":"_csp:aws
          AND _region:eu*"}}'' "$ELASTICSEARCH_URL/_project_routing/"'
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_project_routing/{name}":
    get:
      tags:
      - project
      summary: Get a project routing expression
      description: |2


        ## Required authorization

        * Cluster privileges: `monitor`
      operationId: project-get-routing
      parameters:
      - in: path
        name: name
        description: The name of project routing expression
        required: true
        deprecated: false
        schema:
          type: string
        style: simple
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/project._types.ProjectRoutingExpression"
              examples:
                GetProjectResponseExample1:
                  summary: A single expressions
                  value: |-
                    {
                      "expression" : "_csp:aws AND _region:us*"
                    }
      x-state: Technical preview
      x-codeSamples:
      - lang: Console
        source: 'GET /_project_routing/aws-us-only

          '
      - lang: Python
        source: |-
          resp = client.project.get_routing(
              name="aws-us-only",
          )
      - lang: JavaScript
        source: |-
          const response = await client.project.getRouting({
            name: "aws-us-only",
          });
      - lang: Ruby
        source: |-
          response = client.project.get_routing(
            name: "aws-us-only"
          )
      - lang: PHP
        source: |-
          $resp = $client->project()->getRouting([
              "name" => "aws-us-only",
          ]);
      - lang: curl
        source: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_project_routing/aws-us-only"'
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    put:
      tags:
      - project
      summary: Create or update a project routing expression
      description: |2


        ## Required authorization

        * Cluster privileges: `manage`
      operationId: project-create-routing
      parameters:
      - in: path
        name: name
        description: The name of project routing expression
        required: true
        deprecated: false
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/project._types.ProjectRoutingExpression"
            examples:
              CreateProjectRoutingRequestExample1:
                summary: A single expression
                value: |-
                  {
                    "expression" : "_csp:aws AND _region:us*"
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
              examples:
                CreateProjectResponseExample1:
                  summary: A single expressions
                  value: |-
                    {
                      "acknowledged": true
                    }
      x-state: Technical preview
      x-codeSamples:
      - lang: Console
        source: |-
          PUT /_project_routing/aws-us-only
          {
            "expression" : "_csp:aws AND _region:us*"
          }
      - lang: Python
        source: |-
          resp = client.project.create_routing(
              name="aws-us-only",
              expressions={
                  "expression": "_csp:aws AND _region:us*"
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.project.createRouting({
            name: "aws-us-only",
            expressions: {
              expression: "_csp:aws AND _region:us*",
            },
          });
      - lang: Ruby
        source: |-
          response = client.project.create_routing(
            name: "aws-us-only",
            body: {
              "expression": "_csp:aws AND _region:us*"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->project()->createRouting([
              "name" => "aws-us-only",
              "body" => [
                  "expression" => "_csp:aws AND _region:us*",
              ],
          ]);
      - lang: curl
        source: 'curl -X PUT -H "Authorization: ApiKey $ELASTIC_API_KEY" -H "Content-Type:
          application/json" -d ''{"expression":"_csp:aws AND _region:us*"}'' "$ELASTICSEARCH_URL/_project_routing/aws-us-only"'
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - project
      summary: Delete a project routing expression
      description: |2


        ## Required authorization

        * Cluster privileges: `manage`
      operationId: project-delete-routing
      parameters:
      - in: path
        name: name
        description: The name of project routing expression
        required: true
        deprecated: false
        schema:
          type: string
        style: simple
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
              examples:
                DeleteProjectResponseExample1:
                  value: |-
                    {
                      "acknowledged": true
                    }
      x-state: Technical preview
      x-codeSamples:
      - lang: Console
        source: 'DELETE _project_routing/aws-us-only

          '
      - lang: Python
        source: |-
          resp = client.project.delete_routing(
              name="aws-us-only",
          )
      - lang: JavaScript
        source: |-
          const response = await client.project.deleteRouting({
            name: "aws-us-only",
          });
      - lang: Ruby
        source: |-
          response = client.project.delete_routing(
            name: "aws-us-only"
          )
      - lang: PHP
        source: |-
          $resp = $client->project()->deleteRouting([
              "name" => "aws-us-only",
          ]);
      - lang: curl
        source: 'curl -X DELETE -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_project_routing/aws-us-only"'
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_project/tags":
    post:
      tags:
      - project
      summary: 'Get tags

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_project/tags</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_project/tags</span>\n
        \                     </div>\n                    \n\nGet the tags that are
        defined for the project.\n\n## Required authorization\n\n* Cluster privileges:
        `monitor`\n"
      operationId: project-tags
      requestBody:
        "$ref": "#/components/requestBodies/project.tags"
      responses:
        '200':
          "$ref": "#/components/responses/project.tags-200"
      x-state: Technical preview
      x-codeSamples:
      - lang: Console
        source: 'GET /_project/tags

          '
      - lang: Python
        source: resp = client.project.tags()
      - lang: JavaScript
        source: const response = await client.project.tags();
      - lang: Ruby
        source: response = client.project.tags
      - lang: PHP
        source: "$resp = $client->project()->tags();"
      - lang: curl
        source: 'curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_project/tags"'
      - lang: Java
        source: 'client.project().tags();

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_scripts/{id}/{context}":
    post:
      tags:
      - script
      summary: 'Create or update a script or search template

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/_scripts/{id}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_scripts/{id}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/_scripts/{id}/{context}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_scripts/{id}/{context}</span>\n
        \                     </div>\n                    \n\nCreates or updates a
        stored script or search template.\n\n## Required authorization\n\n* Cluster
        privileges: `manage`\n"
      externalDocs:
        url: https://www.elastic.co/docs/solutions/search/search-templates
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/create-stored-script-api.html
      operationId: put-script
      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"
      requestBody:
        "$ref": "#/components/requestBodies/put_script"
      responses:
        '200':
          "$ref": "#/components/responses/put_script-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _scripts/my-search-template
          {
            "script": {
              "lang": "mustache",
              "source": {
                "query": {
                  "match": {
                    "message": "{{query_string}}"
                  }
                },
                "from": "{{from}}",
                "size": "{{size}}"
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.put_script(
              id="my-search-template",
              script={
                  "lang": "mustache",
                  "source": {
                      "query": {
                          "match": {
                              "message": "{{query_string}}"
                          }
                      },
                      "from": "{{from}}",
                      "size": "{{size}}"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.putScript({
            id: "my-search-template",
            script: {
              lang: "mustache",
              source: {
                query: {
                  match: {
                    message: "{{query_string}}",
                  },
                },
                from: "{{from}}",
                size: "{{size}}",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.put_script(
            id: "my-search-template",
            body: {
              "script": {
                "lang": "mustache",
                "source": {
                  "query": {
                    "match": {
                      "message": "{{query_string}}"
                    }
                  },
                  "from": "{{from}}",
                  "size": "{{size}}"
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->putScript([
              "id" => "my-search-template",
              "body" => [
                  "script" => [
                      "lang" => "mustache",
                      "source" => [
                          "query" => [
                              "match" => [
                                  "message" => "{{query_string}}",
                              ],
                          ],
                          "from" => "{{from}}",
                          "size" => "{{size}}",
                      ],
                  ],
              ],
          ]);
      - 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
        name: product_name
  "/_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.

        ## Required authorization

        * Cluster privileges: `manage_search_query_rules`
      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.18/get-query-rule.html
      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
        deprecated: false
        schema:
          "$ref": "#/components/schemas/_types.Id"
        style: simple
      - 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"
        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: |-
                    {
                      "rule_id": "my-rule1",
                      "type": "pinned",
                      "criteria": [
                        {
                          "type": "contains",
                          "metadata": "query_string",
                          "values": [
                            "pugs",
                            "puggles"
                          ]
                        }
                      ],
                      "actions": {
                        "ids": [
                          "id1",
                          "id2"
                        ]
                      }
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _query_rules/my-ruleset/_rule/my-rule1

          '
      - lang: Python
        source: |-
          resp = client.query_rules.get_rule(
              ruleset_id="my-ruleset",
              rule_id="my-rule1",
          )
      - lang: JavaScript
        source: |-
          const response = await client.queryRules.getRule({
            ruleset_id: "my-ruleset",
            rule_id: "my-rule1",
          });
      - lang: Ruby
        source: |-
          response = client.query_rules.get_rule(
            ruleset_id: "my-ruleset",
            rule_id: "my-rule1"
          )
      - lang: PHP
        source: |-
          $resp = $client->queryRules()->getRule([
              "ruleset_id" => "my-ruleset",
              "rule_id" => "my-rule1",
          ]);
      - 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
              .ruleId("my-rule1")
              .rulesetId("my-ruleset")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    put:
      tags:
      - query_rules
      summary: Create or update a query rule
      description: |
        Create or update a query rule within a query ruleset.

        IMPORTANT: Due to limitations within pinned queries, you can only pin documents using ids or docs, but cannot use both in single rule.
        It is advised to use one or the other in query rulesets, to avoid errors.
        Additionally, pinned queries have a maximum limit of 100 pinned hits.
        If multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset.

        ## Required authorization

        * Cluster privileges: `manage_search_query_rules`
      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.18/put-query-rule.html
      operationId: query-rules-put-rule
      parameters:
      - 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
      - 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
              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.
                    If 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.
                    The 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.

                  '
                value: |-
                  {
                    "match_criteria": {
                      "query_string": "puggles"
                    }
                  }
        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
      x-codeSamples:
      - lang: Console
        source: |-
          POST _query_rules/my-ruleset/_test
          {
            "match_criteria": {
              "query_string": "puggles"
            }
          }
      - lang: Python
        source: |-
          resp = client.query_rules.test(
              ruleset_id="my-ruleset",
              match_criteria={
                  "query_string": "puggles"
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.queryRules.test({
            ruleset_id: "my-ruleset",
            match_criteria: {
              query_string: "puggles",
            },
          });
      - lang: Ruby
        source: |-
          response = client.query_rules.test(
            ruleset_id: "my-ruleset",
            body: {
              "match_criteria": {
                "query_string": "puggles"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->queryRules()->test([
              "ruleset_id" => "my-ruleset",
              "body" => [
                  "match_criteria" => [
                      "query_string" => "puggles",
                  ],
              ],
          ]);
      - 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
              .matchCriteria("query_string", JsonData.fromJson("\"puggles\""))
              .rulesetId("my-ruleset")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - query_rules
      summary: Delete a query rule
      description: |
        Delete a query rule within a query ruleset.
        This is a destructive action that is only recoverable by re-adding the same rule with the create or update query rule API.

        ## Required authorization

        * Cluster privileges: `manage_search_query_rules`
      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.18/delete-query-rule.html
      operationId: query-rules-delete-rule
      parameters:
      - 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
      - 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"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _query_rules/my-ruleset/_rule/my-rule1

          '
      - lang: Python
        source: |-
          resp = client.query_rules.delete_rule(
              ruleset_id="my-ruleset",
              rule_id="my-rule1",
          )
      - lang: JavaScript
        source: |-
          const response = await client.queryRules.deleteRule({
            ruleset_id: "my-ruleset",
            rule_id: "my-rule1",
          });
      - lang: Ruby
        source: |-
          response = client.query_rules.delete_rule(
            ruleset_id: "my-ruleset",
            rule_id: "my-rule1"
          )
      - lang: PHP
        source: |-
          $resp = $client->queryRules()->deleteRule([
              "ruleset_id" => "my-ruleset",
              "rule_id" => "my-rule1",
          ]);
      - 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
              .ruleId("my-rule1")
              .rulesetId("my-ruleset")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_query_rules/{ruleset_id}":
    get:
      tags:
      - query_rules
      summary: Get a query ruleset
      description: |
        Get details about a query ruleset.

        ## Required authorization

        * Cluster privileges: `manage_search_query_rules`
      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.18/get-query-ruleset.html
      operationId: query-rules-get-ruleset
      parameters:
      - 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: |-
                    {
                        "ruleset_id": "my-ruleset",
                        "rules": [
                            {
                                "rule_id": "my-rule1",
                                "type": "pinned",
                                "criteria": [
                                    {
                                        "type": "contains",
                                        "metadata": "query_string",
                                        "values": [ "pugs", "puggles" ]
                                    }
                                ],
                                "actions": {
                                    "ids": [
                                        "id1",
                                        "id2"
                                    ]
                                }
                            },
                            {
                                "rule_id": "my-rule2",
                                "type": "pinned",
                                "criteria": [
                                    {
                                        "type": "fuzzy",
                                        "metadata": "query_string",
                                        "values": [ "rescue dogs" ]
                                    }
                                ],
                                "actions": {
                                    "docs": [
                                        {
                                            "_index": "index1",
                                            "_id": "id3"
                                        },
                                        {
                                            "_index": "index2",
                                            "_id": "id4"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _query_rules/my-ruleset/

          '
      - lang: Python
        source: |-
          resp = client.query_rules.get_ruleset(
              ruleset_id="my-ruleset",
          )
      - lang: JavaScript
        source: |-
          const response = await client.queryRules.getRuleset({
            ruleset_id: "my-ruleset",
          });
      - lang: Ruby
        source: |-
          response = client.query_rules.get_ruleset(
            ruleset_id: "my-ruleset"
          )
      - lang: PHP
        source: |-
          $resp = $client->queryRules()->getRuleset([
              "ruleset_id" => "my-ruleset",
          ]);
      - 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
              .rulesetId("my-ruleset")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    put:
      tags:
      - query_rules
      summary: Create or update a query ruleset
      description: |
        There is a limit of 100 rules per ruleset.
        This limit can be increased by using the `xpack.applications.rules.max_rules_per_ruleset` cluster setting.

        IMPORTANT: Due to limitations within pinned queries, you can only select documents using `ids` or `docs`, but cannot use both in single rule.
        It is advised to use one or the other in query rulesets, to avoid errors.
        Additionally, pinned queries have a maximum limit of 100 pinned hits.
        If multiple matching rules pin more than 100 documents, only the first 100 documents are pinned in the order they are specified in the ruleset.

        ## Required authorization

        * Cluster privileges: `manage_search_query_rules`
      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.18/put-query-ruleset.html
      operationId: query-rules-put-ruleset
      parameters:
      - 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
            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`.

                  '
                value: |-
                  {
                      "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"
                                      }
                                  ]
                              }
                          }
                      ]
                  }
        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
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _query_rules/my-ruleset
          {
              "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"
                              }
                          ]
                      }
                  }
              ]
          }
      - lang: Python
        source: |-
          resp = client.query_rules.put_ruleset(
              ruleset_id="my-ruleset",
              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"
                              }
                          ]
                      }
                  }
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.queryRules.putRuleset({
            ruleset_id: "my-ruleset",
            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",
                    },
                  ],
                },
              },
            ],
          });
      - lang: Ruby
        source: |-
          response = client.query_rules.put_ruleset(
            ruleset_id: "my-ruleset",
            body: {
              "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"
                      }
                    ]
                  }
                }
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->queryRules()->putRuleset([
              "ruleset_id" => "my-ruleset",
              "body" => [
                  "rules" => array(
                      [
                          "rule_id" => "my-rule1",
                          "type" => "pinned",
                          "criteria" => array(
                              [
                                  "type" => "contains",
                                  "metadata" => "user_query",
                                  "values" => array(
                                      "pugs",
                                      "puggles",
                                  ),
                              ],
                              [
                                  "type" => "exact",
                                  "metadata" => "user_country",
                                  "values" => array(
                                      "us",
                                  ),
                              ],
                          ),
                          "actions" => [
                              "ids" => array(
                                  "id1",
                                  "id2",
                              ),
                          ],
                      ],
                      [
                          "rule_id" => "my-rule2",
                          "type" => "pinned",
                          "criteria" => array(
                              [
                                  "type" => "fuzzy",
                                  "metadata" => "user_query",
                                  "values" => array(
                                      "rescue dogs",
                                  ),
                              ],
                          ),
                          "actions" => [
                              "docs" => array(
                                  [
                                      "_index" => "index1",
                                      "_id" => "id3",
                                  ],
                                  [
                                      "_index" => "index2",
                                      "_id" => "id4",
                                  ],
                              ),
                          ],
                      ],
                  ),
              ],
          ]);
      - 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
              .rules(List.of(QueryRule.queryRuleOf(q -> q
                      .ruleId("my-rule1")
                      .type(QueryRuleType.Pinned)
                      .criteria(List.of(QueryRuleCriteria.of(qu -> qu
                              .type(QueryRuleCriteriaType.Contains)
                              .metadata("user_query")
                              .values(List.of(JsonData.fromJson("\"pugs\""),JsonData.fromJson("\"puggles\"")))
                          ),QueryRuleCriteria.of(qu -> qu
                              .type(QueryRuleCriteriaType.Exact)
                              .metadata("user_country")
                              .values(JsonData.fromJson("\"us\""))
                          )))
                      .actions(a -> a
                          .ids(List.of("id1","id2"))
                      )
                  ),QueryRule.queryRuleOf(q -> q
                      .ruleId("my-rule2")
                      .type(QueryRuleType.Pinned)
                      .criteria(c -> c
                          .type(QueryRuleCriteriaType.Fuzzy)
                          .metadata("user_query")
                          .values(JsonData.fromJson("\"rescue dogs\""))
                      )
                      .actions(a -> a
                          .docs(List.of(PinnedDoc.of(pi -> pi
                                  .id("id3")
                                  .index("index1")
                              ),PinnedDoc.of(pi -> pi
                                  .id("id4")
                                  .index("index2")
                              )))
                      )
                  )))
              .rulesetId("my-ruleset")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - query_rules
      summary: Delete a query ruleset
      description: |
        Remove a query ruleset and its associated data.
        This is a destructive action that is not recoverable.

        ## Required authorization

        * Cluster privileges: `manage_search_query_rules`
      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.18/delete-query-ruleset.html
      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
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _query_rules/my-ruleset/

          '
      - lang: Python
        source: |-
          resp = client.query_rules.delete_ruleset(
              ruleset_id="my-ruleset",
          )
      - lang: JavaScript
        source: |-
          const response = await client.queryRules.deleteRuleset({
            ruleset_id: "my-ruleset",
          });
      - lang: Ruby
        source: |-
          response = client.query_rules.delete_ruleset(
            ruleset_id: "my-ruleset"
          )
      - lang: PHP
        source: |-
          $resp = $client->queryRules()->deleteRuleset([
              "ruleset_id" => "my-ruleset",
          ]);
      - 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
              .rulesetId("my-ruleset")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_query_rules":
    get:
      tags:
      - query_rules
      summary: Get all query rulesets
      description: |
        Get summarized information about the query rulesets.

        ## Required authorization

        * Cluster privileges: `manage_search_query_rules`
      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.18/list-query-rulesets.html
      operationId: query-rules-list-rulesets
      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.
        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/query_rules.list_rulesets.QueryRulesetListItem"
                required:
                - count
                - results
              examples:
                QueryRulesetListResponseExample1:
                  description: A successful response from `GET _query_rules/?from=0&size=3`.
                  value: |-
                    {
                        "count": 3,
                        "results": [
                            {
                                "ruleset_id": "ruleset-1",
                                "rule_total_count": 1,
                                "rule_criteria_types_counts": {
                                    "exact": 1
                                }
                            },
                            {
                                "ruleset_id": "ruleset-2",
                                "rule_total_count": 2,
                                "rule_criteria_types_counts": {
                                    "exact": 1,
                                    "fuzzy": 1
                                }
                            },
                            {
                                "ruleset_id": "ruleset-3",
                                "rule_total_count": 3,
                                "rule_criteria_types_counts": {
                                    "exact": 1,
                                    "fuzzy": 2
                                }
                            }
                        ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _query_rules/?from=0&size=3

          '
      - lang: Python
        source: |-
          resp = client.query_rules.list_rulesets(
              from="0",
              size="3",
          )
      - lang: JavaScript
        source: |-
          const response = await client.queryRules.listRulesets({
            from: 0,
            size: 3,
          });
      - lang: Ruby
        source: |-
          response = client.query_rules.list_rulesets(
            from: "0",
            size: "3"
          )
      - lang: PHP
        source: |-
          $resp = $client->queryRules()->listRulesets([
              "from" => "0",
              "size" => "3",
          ]);
      - 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
              .from(0)
              .size(3)
          );
      x-metaTags:
      - 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.

        ## Required authorization

        * Cluster privileges: `manage_search_query_rules`
      operationId: query-rules-test
      parameters:
      - 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.
                    Match 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`.

                  '
                value: |-
                  {
                      "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"
                                      }
                                  ]
                              }
                          }
                      ]
                  }
        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: |-
                    {
                      "total_matched_rules": 1,
                      "matched_rules": [
                        {
                          "ruleset_id": "my-ruleset",
                          "rule_id": "my-rule1"
                        }
                      ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _query_rules/my-ruleset
          {
              "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"
                              }
                          ]
                      }
                  }
              ]
          }
      - lang: Python
        source: |-
          resp = client.query_rules.put_ruleset(
              ruleset_id="my-ruleset",
              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"
                              }
                          ]
                      }
                  }
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.queryRules.putRuleset({
            ruleset_id: "my-ruleset",
            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",
                    },
                  ],
                },
              },
            ],
          });
      - lang: Ruby
        source: |-
          response = client.query_rules.put_ruleset(
            ruleset_id: "my-ruleset",
            body: {
              "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"
                      }
                    ]
                  }
                }
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->queryRules()->putRuleset([
              "ruleset_id" => "my-ruleset",
              "body" => [
                  "rules" => array(
                      [
                          "rule_id" => "my-rule1",
                          "type" => "pinned",
                          "criteria" => array(
                              [
                                  "type" => "contains",
                                  "metadata" => "user_query",
                                  "values" => array(
                                      "pugs",
                                      "puggles",
                                  ),
                              ],
                              [
                                  "type" => "exact",
                                  "metadata" => "user_country",
                                  "values" => array(
                                      "us",
                                  ),
                              ],
                          ),
                          "actions" => [
                              "ids" => array(
                                  "id1",
                                  "id2",
                              ),
                          ],
                      ],
                      [
                          "rule_id" => "my-rule2",
                          "type" => "pinned",
                          "criteria" => array(
                              [
                                  "type" => "fuzzy",
                                  "metadata" => "user_query",
                                  "values" => array(
                                      "rescue dogs",
                                  ),
                              ],
                          ),
                          "actions" => [
                              "docs" => array(
                                  [
                                      "_index" => "index1",
                                      "_id" => "id3",
                                  ],
                                  [
                                      "_index" => "index2",
                                      "_id" => "id4",
                                  ],
                              ),
                          ],
                      ],
                  ),
              ],
          ]);
      - 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
              .rules(List.of(QueryRule.queryRuleOf(q -> q
                      .ruleId("my-rule1")
                      .type(QueryRuleType.Pinned)
                      .criteria(List.of(QueryRuleCriteria.of(qu -> qu
                              .type(QueryRuleCriteriaType.Contains)
                              .metadata("user_query")
                              .values(List.of(JsonData.fromJson("\"pugs\""),JsonData.fromJson("\"puggles\"")))
                          ),QueryRuleCriteria.of(qu -> qu
                              .type(QueryRuleCriteriaType.Exact)
                              .metadata("user_country")
                              .values(JsonData.fromJson("\"us\""))
                          )))
                      .actions(a -> a
                          .ids(List.of("id1","id2"))
                      )
                  ),QueryRule.queryRuleOf(q -> q
                      .ruleId("my-rule2")
                      .type(QueryRuleType.Pinned)
                      .criteria(c -> c
                          .type(QueryRuleCriteriaType.Fuzzy)
                          .metadata("user_query")
                          .values(JsonData.fromJson("\"rescue dogs\""))
                      )
                      .actions(a -> a
                          .docs(List.of(PinnedDoc.of(pi -> pi
                                  .id("id3")
                                  .index("index1")
                              ),PinnedDoc.of(pi -> pi
                                  .id("id4")
                                  .index("index2")
                              )))
                      )
                  )))
              .rulesetId("my-ruleset")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_rank_eval":
    post:
      tags:
      - search
      summary: 'Evaluate ranked search results

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_rank_eval</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_rank_eval</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_rank_eval</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_rank_eval</span>\n
        \                     </div>\n                    \n\nEvaluate the quality
        of ranked search results over a set of typical search queries.\n\n## Required
        authorization\n\n* Index privileges: `read`\n"
      operationId: rank-eval
      parameters:
      - "$ref": "#/components/parameters/rank_eval-index"
      - "$ref": "#/components/parameters/rank_eval-allow_no_indices"
      - "$ref": "#/components/parameters/rank_eval-expand_wildcards"
      - "$ref": "#/components/parameters/rank_eval-ignore_unavailable"
      - "$ref": "#/components/parameters/rank_eval-search_type"
      requestBody:
        "$ref": "#/components/requestBodies/rank_eval"
      responses:
        '200':
          "$ref": "#/components/responses/rank_eval-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          GET /my-index-000001/_rank_eval
          {
            "requests": [
              {
                "id": "JFK query",
                "request": { "query": { "match_all": {} } },
                "ratings": []
              } ],
            "metric": {
              "precision": {
                "k": 20,
                "relevant_rating_threshold": 1,
                "ignore_unlabeled": false
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.rank_eval(
              index="my-index-000001",
              requests=[
                  {
                      "id": "JFK query",
                      "request": {
                          "query": {
                              "match_all": {}
                          }
                      },
                      "ratings": []
                  }
              ],
              metric={
                  "precision": {
                      "k": 20,
                      "relevant_rating_threshold": 1,
                      "ignore_unlabeled": False
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.rankEval({
            index: "my-index-000001",
            requests: [
              {
                id: "JFK query",
                request: {
                  query: {
                    match_all: {},
                  },
                },
                ratings: [],
              },
            ],
            metric: {
              precision: {
                k: 20,
                relevant_rating_threshold: 1,
                ignore_unlabeled: false,
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.rank_eval(
            index: "my-index-000001",
            body: {
              "requests": [
                {
                  "id": "JFK query",
                  "request": {
                    "query": {
                      "match_all": {}
                    }
                  },
                  "ratings": []
                }
              ],
              "metric": {
                "precision": {
                  "k": 20,
                  "relevant_rating_threshold": 1,
                  "ignore_unlabeled": false
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->rankEval([
              "index" => "my-index-000001",
              "body" => [
                  "requests" => array(
                      [
                          "id" => "JFK query",
                          "request" => [
                              "query" => [
                                  "match_all" => new ArrayObject([]),
                              ],
                          ],
                          "ratings" => array(
                          ),
                      ],
                  ),
                  "metric" => [
                      "precision" => [
                          "k" => 20,
                          "relevant_rating_threshold" => 1,
                          "ignore_unlabeled" => false,
                      ],
                  ],
              ],
          ]);
      - 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
              .index("my-index-000001")
              .metric(m -> m
                  .precision(p -> p
                      .ignoreUnlabeled(false)
                      .relevantRatingThreshold(1)
                      .k(20)
                  )
              )
              .requests(re -> re
                  .id("JFK query")
                  .request(req -> req
                      .query(q -> q
                          .matchAll(m -> m)
                      )
                  )
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_reindex":
    post:
      tags:
      - document
      summary: Reindex documents
      description: |
        Copy documents from a source to a destination.
        You can copy all documents to the destination index or reindex a subset of the documents.
        The source can be any existing index, alias, or data stream.
        The destination must differ from the source.
        For example, you cannot reindex a data stream into itself.

        IMPORTANT: Reindex requires `_source` to be enabled for all documents in the source.
        The destination should be configured as wanted before calling the reindex API.
        Reindex does not copy the settings from the source or its associated template.
        Mappings, shard counts, and replicas, for example, must be configured ahead of time.

        If the Elasticsearch security features are enabled, you must have the following security privileges:

        * The `read` index privilege for the source data stream, index, or alias.
        * The `write` index privilege for the destination data stream, index, or index alias.
        * 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.
        * 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.

        If 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.
        If reindexing from a remote cluster into an Elastic Cloud Serverless project, only remote hosts from Elastic Cloud Hosted are allowed.
        Automatic data stream creation requires a matching index template with data stream enabled.

        The `dest` element can be configured like the index API to control optimistic concurrency control.
        Omitting `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.

        Setting `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.

        Setting `op_type` to `create` causes the reindex API to create only missing documents in the destination.
        All existing documents will cause a version conflict.

        IMPORTANT: Because data streams are append-only, any reindex request to a destination data stream must have an `op_type` of `create`.
        A reindex can only add new documents to a destination data stream.
        It cannot update existing documents in a destination data stream.

        By default, version conflicts abort the reindex process.
        To continue reindexing if there are conflicts, set the `conflicts` request body property to `proceed`.
        In this case, the response includes a count of the version conflicts that were encountered.
        Note that the handling of other error types is unaffected by the `conflicts` property.
        Additionally, 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.

        It's recommended to reindex on indices with a green status. Reindexing can fail when a node shuts down or crashes.
        * When requested with `wait_for_completion=true` (default), the request fails if the node shuts down.
        * 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.
        When retrying a failed reindex operation, it might be necessary to set `conflicts=proceed` or to first delete the partial destination index.
        Additionally, dry runs, checking disk space, and fetching index recovery information can help address the root cause.

        Refer to the linked documentation for examples of how to reindex documents.

        ## Required authorization

        * Index privileges: `read`,`write`
      externalDocs:
        url: https://www.elastic.co/docs/reference/elasticsearch/rest-apis/reindex-indices
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-reindex.html
      operationId: reindex
      parameters:
      - 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
      - in: query
        name: requests_per_second
        description: |-
          The throttle for this request in sub-requests per second.
          By default, there is no throttle.
        deprecated: false
        schema:
          type: number
        style: form
      - 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
      - in: query
        name: slices
        description: |-
          The number of slices this task should be divided into.
          It defaults to one slice, which means the task isn't sliced into subtasks.

          Reindex supports sliced scroll to parallelize the reindexing process.
          This parallelization can improve efficiency and provide a convenient way to break the request down into smaller parts.

          NOTE: Reindexing from remote clusters does not support manual or automatic slicing.

          If set to `auto`, Elasticsearch chooses the number of slices to use.
          This setting will use one slice per shard, up to a certain limit.
          If 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"
        style: form
      - in: query
        name: max_docs
        description: |-
          The maximum number of documents to reindex.
          By default, all documents are reindexed.
          If it is a value less then or equal to `scroll_size`, a scroll will not be used to retrieve the results for the operation.

          If `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
      - in: query
        name: timeout
        description: |-
          The period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards.
          By default, Elasticsearch waits for at least one minute before failing.
          The 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 shard copies that must be active before proceeding with the operation.
          Set it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
          The 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
      - 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
              properties:
                conflicts:
                  description: |+
                    Indicates whether to continue reindexing even when there are conflicts.

                    Supported values include:
                      - `abort`: Stop reindexing if there are conflicts.
                      - `proceed`: Continue reindexing even if 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.
                    By default, all documents are reindexed.
                    If it is a value less then or equal to `scroll_size`, a scroll will not be used to retrieve the results for the operation.

                    If `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
            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.

                  '
                value: |-
                  {
                    "source": {
                      "index": ["my-index-000001", "my-index-000002"]
                    },
                    "dest": {
                      "index": "my-new-index-000002"
                    }
                  }
              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`.

                  '
                value: |-
                  {
                    "source": {
                      "index": "metricbeat-*"
                    },
                    "dest": {
                      "index": "metricbeat"
                    },
                    "script": {
                      "lang": "painless",
                      "source": "ctx._index = 'metricbeat-' + (ctx._index.substring('metricbeat-'.length(), ctx._index.length())) + '-1'"
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "max_docs": 10,
                    "source": {
                      "index": "my-index-000001",
                      "query": {
                        "function_score" : {
                          "random_score" : {},
                          "min_score" : 0.9
                        }
                      }
                    },
                    "dest": {
                      "index": "my-new-index-000001"
                    }
                  }
              ReindexRequestExample12:
                summary: Reindex modified documents
                description: 'Run `POST _reindex` to modify documents during reindexing.
                  This example bumps the version of the source document.

                  '
                value: |-
                  {
                    "source": {
                      "index": "my-index-000001"
                    },
                    "dest": {
                      "index": "my-new-index-000001",
                      "version_type": "external"
                    },
                    "script": {
                      "source": "if (ctx._source.foo == 'bar') {ctx._version++; ctx._source.remove('foo')}",
                      "lang": "painless"
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "source": {
                      "remote": {
                        "host": "http://otherhost:9200",
                        "username": "user",
                        "password": "pass"
                      },
                      "index": "my-index-000001",
                      "query": {
                        "match": {
                          "test": "data"
                        }
                      }
                    },
                    "dest": {
                      "index": "my-new-index-000001"
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "source": {
                      "index": "my-index-000001",
                      "slice": {
                        "id": 0,
                        "max": 2
                      }
                    },
                    "dest": {
                      "index": "my-new-index-000001"
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "source": {
                      "index": "my-index-000001"
                    },
                    "dest": {
                      "index": "my-new-index-000001"
                    }
                  }
              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`.

                  '
                value: |-
                  {
                    "source": {
                      "index": "source",
                      "query": {
                        "match": {
                          "company": "cat"
                        }
                      }
                    },
                    "dest": {
                      "index": "dest",
                      "routing": "=cat"
                    }
                  }
              ReindexRequestExample5:
                summary: Ingest pipelines
                description: Run `POST _reindex` and use the ingest pipelines feature.
                value: |-
                  {
                    "source": {
                      "index": "source"
                    },
                    "dest": {
                      "index": "dest",
                      "pipeline": "some_ingest_pipeline"
                    }
                  }
              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`.

                  '
                value: |-
                  {
                    "source": {
                      "index": "my-index-000001",
                      "query": {
                        "term": {
                          "user.id": "kimchy"
                        }
                      }
                    },
                    "dest": {
                      "index": "my-new-index-000001"
                    }
                  }
              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`.

                  '
                value: |-
                  {
                    "max_docs": 1,
                    "source": {
                      "index": "my-index-000001"
                    },
                    "dest": {
                      "index": "my-new-index-000001"
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "source": {
                      "index": "my-index-000001",
                      "_source": ["user.id", "_doc"]
                    },
                    "dest": {
                      "index": "my-new-index-000001"
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "source": {
                      "index": "my-index-000001"
                    },
                    "dest": {
                      "index": "my-new-index-000001"
                    },
                    "script": {
                      "source": "ctx._source.tag = ctx._source.remove(\"flag\")"
                    }
                  }
        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.
                      If this array is not empty, the request ended because of those failures.
                      Reindex 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.
                      You 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.
                      It 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.
                      That 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
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _reindex
          {
            "source": {
              "index": ["my-index-000001", "my-index-000002"]
            },
            "dest": {
              "index": "my-new-index-000002"
            }
          }
      - lang: Python
        source: |-
          resp = client.reindex(
              source={
                  "index": [
                      "my-index-000001",
                      "my-index-000002"
                  ]
              },
              dest={
                  "index": "my-new-index-000002"
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.reindex({
            source: {
              index: ["my-index-000001", "my-index-000002"],
            },
            dest: {
              index: "my-new-index-000002",
            },
          });
      - lang: Ruby
        source: |-
          response = client.reindex(
            body: {
              "source": {
                "index": [
                  "my-index-000001",
                  "my-index-000002"
                ]
              },
              "dest": {
                "index": "my-new-index-000002"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->reindex([
              "body" => [
                  "source" => [
                      "index" => array(
                          "my-index-000001",
                          "my-index-000002",
                      ),
                  ],
                  "dest" => [
                      "index" => "my-new-index-000002",
                  ],
              ],
          ]);
      - 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
              .dest(d -> d
                  .index("my-new-index-000002")
              )
              .source(s -> s
                  .index(List.of("my-index-000001","my-index-000002"))
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_render/template/{id}":
    post:
      tags:
      - search
      summary: 'Render a search template

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_render/template</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_render/template</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_render/template/{id}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_render/template/{id}</span>\n
        \                     </div>\n                    \n\nRender a search template
        as a search request body.\n\n## Required authorization\n\n* Index privileges:
        `read`\n"
      operationId: render-search-template
      parameters:
      - "$ref": "#/components/parameters/render_search_template-id"
      requestBody:
        "$ref": "#/components/requestBodies/render_search_template"
      responses:
        '200':
          "$ref": "#/components/responses/render_search_template-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _render/template
          {
            "id": "my-search-template",
            "params": {
              "query_string": "hello world",
              "from": 20,
              "size": 10
            }
          }
      - lang: Python
        source: |-
          resp = client.render_search_template(
              id="my-search-template",
              params={
                  "query_string": "hello world",
                  "from": 20,
                  "size": 10
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.renderSearchTemplate({
            id: "my-search-template",
            params: {
              query_string: "hello world",
              from: 20,
              size: 10,
            },
          });
      - lang: Ruby
        source: |-
          response = client.render_search_template(
            body: {
              "id": "my-search-template",
              "params": {
                "query_string": "hello world",
                "from": 20,
                "size": 10
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->renderSearchTemplate([
              "body" => [
                  "id" => "my-search-template",
                  "params" => [
                      "query_string" => "hello world",
                      "from" => 20,
                      "size" => 10,
                  ],
              ],
          ]);
      - 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
              .id("my-search-template")
              .params(Map.of("size", JsonData.fromJson("10"),"from", JsonData.fromJson("20"),"query_string", JsonData.fromJson("\"hello world\"")))
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_scripts/painless/_execute":
    post:
      tags:
      - script
      summary: 'Run a script

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_scripts/painless/_execute</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_scripts/painless/_execute</span>\n
        \                     </div>\n                    \n\nRuns 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-state: Technical preview
      x-codeSamples:
      - lang: Console
        source: |-
          POST /_scripts/painless/_execute
          {
            "script": {
              "source": "params.count / params.total",
              "params": {
                "count": 100.0,
                "total": 1000.0
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.scripts_painless_execute(
              script={
                  "source": "params.count / params.total",
                  "params": {
                      "count": 100,
                      "total": 1000
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.scriptsPainlessExecute({
            script: {
              source: "params.count / params.total",
              params: {
                count: 100,
                total: 1000,
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.scripts_painless_execute(
            body: {
              "script": {
                "source": "params.count / params.total",
                "params": {
                  "count": 100,
                  "total": 1000
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->scriptsPainlessExecute([
              "body" => [
                  "script" => [
                      "source" => "params.count / params.total",
                      "params" => [
                          "count" => 100,
                          "total" => 1000,
                      ],
                  ],
              ],
          ]);
      - 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
              .script(sc -> sc
                  .source(so -> so
                      .scriptString("params.count / params.total")
                  )
                  .params(Map.of("total", JsonData.fromJson("1000"),"count", JsonData.fromJson("100")))
              )
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_search":
    post:
      tags:
      - search
      summary: 'Run a search

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_search</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_search</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_search</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_search</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n##
        Required authorization\n\n* Index privileges: `read`\n"
      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.18/search-search.html
      operationId: search
      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_exclude_vectors"
      - "$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-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          GET /my-index-000001/_search?from=40&size=20
          {
            "query": {
              "term": {
                "user.id": "kimchy"
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.search(
              index="my-index-000001",
              from="40",
              size="20",
              query={
                  "term": {
                      "user.id": "kimchy"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.search({
            index: "my-index-000001",
            from: 40,
            size: 20,
            query: {
              term: {
                "user.id": "kimchy",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.search(
            index: "my-index-000001",
            from: "40",
            size: "20",
            body: {
              "query": {
                "term": {
                  "user.id": "kimchy"
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->search([
              "index" => "my-index-000001",
              "from" => "40",
              "size" => "20",
              "body" => [
                  "query" => [
                      "term" => [
                          "user.id" => "kimchy",
                      ],
                  ],
              ],
          ]);
      - 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
              .from(40)
              .index("my-index-000001")
              .query(q -> q
                  .term(t -> t
                      .field("user.id")
                      .value(FieldValue.of("kimchy"))
                  )
              )
              .size(20)
          ,Void.class);
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_application/search_application/{name}":
    get:
      tags:
      - search_application
      summary: Get search application details
      description: |2


        ## Required authorization

        * Cluster privileges: `manage_search_application`
      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: |-
                    {
                      "name": "my-app",
                      "indices": [ "index1", "index2" ],
                      "updated_at_millis": 1682105622204,
                      "template": {
                        "script": {
                          "source": {
                            "query": {
                              "query_string": {
                                "query": "{{query_string}}",
                                "default_field": "{{default_field}}"
                              }
                            }
                          },
                          "lang": "mustache",
                          "options": {
                            "content_type": "application/json;charset=utf-8"
                          },
                          "params": {
                            "query_string": "*",
                            "default_field": "*"
                          }
                        }
                      }
                    }
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: 'GET _application/search_application/my-app/

          '
      - lang: Python
        source: |-
          resp = client.search_application.get(
              name="my-app",
          )
      - lang: JavaScript
        source: |-
          const response = await client.searchApplication.get({
            name: "my-app",
          });
      - lang: Ruby
        source: |-
          response = client.search_application.get(
            name: "my-app"
          )
      - lang: PHP
        source: |-
          $resp = $client->searchApplication()->get([
              "name" => "my-app",
          ]);
      - 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
              .name("my-app")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    put:
      tags:
      - search_application
      summary: Create or update a search application
      description: |2


        ## Required authorization

        * Index privileges: `manage`
        * Cluster privileges: `manage_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.

                  '
                value: |-
                  {
                    "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"
                        ]
                      }
                    }
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    allOf:
                    - "$ref": "#/components/schemas/_types.Result"
                required:
                - result
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _application/search_application/my-app
          {
            "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"
                ]
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.search_application.put(
              name="my-app",
              search_application={
                  "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"
                          ]
                      }
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.searchApplication.put({
            name: "my-app",
            search_application: {
              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"],
                },
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.search_application.put(
            name: "my-app",
            body: {
              "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"
                  ]
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->searchApplication()->put([
              "name" => "my-app",
              "body" => [
                  "indices" => array(
                      "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" => array(
                                      "title",
                                      "description",
                                  ),
                              ],
                              "additionalProperties" => false,
                          ],
                          "required" => array(
                              "query_string",
                          ),
                      ],
                  ],
              ],
          ]);
      - 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
              .name("my-app")
              .searchApplication(s -> s
                  .indices(List.of("index1","index2"))
                  .template(t -> t
                      .script(sc -> sc
                          .source(so -> so
                              .scriptTemplate(scr -> scr
                                  .query(q -> q
                                      .queryString(qu -> qu
                                          .defaultField("{{default_field}}")
                                          .query("{{query_string}}")
                                      )
                                  )
                              )
                          )
                          .params(Map.of("default_field", JsonData.fromJson("\"*\""),"query_string", JsonData.fromJson("\"*\"")))
                      )
                  )
              )
          );
      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.

        ## Required authorization

        * Index privileges: `manage`
        * Cluster privileges: `manage_search_application`
      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
      x-codeSamples:
      - lang: Console
        source: 'DELETE _application/search_application/my-app/

          '
      - lang: Python
        source: |-
          resp = client.search_application.delete(
              name="my-app",
          )
      - lang: JavaScript
        source: |-
          const response = await client.searchApplication.delete({
            name: "my-app",
          });
      - lang: Ruby
        source: |-
          response = client.search_application.delete(
            name: "my-app"
          )
      - lang: PHP
        source: |-
          $resp = $client->searchApplication()->delete([
              "name" => "my-app",
          ]);
      - 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
              .name("my-app")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_application/analytics/{name}":
    get:
      tags:
      - analytics
      summary: 'Get behavioral analytics collections

        '
      description: |-
        **All methods and paths for this operation:**

        <div>
                              <span class="operation-verb get">GET</span>
                              <span class="operation-path">/_application/analytics</span>
                              </div>
                            <div>
                              <span class="operation-verb get">GET</span>
                              <span class="operation-path">/_application/analytics/{name}</span>
                              </div>
      operationId: search-application-get-behavioral-analytics
      parameters:
      - "$ref": "#/components/parameters/search_application.get_behavioral_analytics-name"
      responses:
        '200':
          "$ref": "#/components/responses/search_application.get_behavioral_analytics-200"
      deprecated: true
      x-state: Technical preview
      x-codeSamples:
      - lang: Console
        source: 'GET _application/analytics/my*

          '
      - lang: Python
        source: |-
          resp = client.search_application.get_behavioral_analytics(
              name="my*",
          )
      - lang: JavaScript
        source: |-
          const response = await client.searchApplication.getBehavioralAnalytics({
            name: "my*",
          });
      - lang: Ruby
        source: |-
          response = client.search_application.get_behavioral_analytics(
            name: "my*"
          )
      - lang: PHP
        source: |-
          $resp = $client->searchApplication()->getBehavioralAnalytics([
              "name" => "my*",
          ]);
      - 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
              .name("my*")
          );
      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
      x-codeSamples:
      - lang: Console
        source: 'PUT _application/analytics/my_analytics_collection

          '
      - lang: Python
        source: |-
          resp = client.search_application.put_behavioral_analytics(
              name="my_analytics_collection",
          )
      - lang: JavaScript
        source: |-
          const response = await client.searchApplication.putBehavioralAnalytics({
            name: "my_analytics_collection",
          });
      - lang: Ruby
        source: |-
          response = client.search_application.put_behavioral_analytics(
            name: "my_analytics_collection"
          )
      - lang: PHP
        source: |-
          $resp = $client->searchApplication()->putBehavioralAnalytics([
              "name" => "my_analytics_collection",
          ]);
      - 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
              .name("my_analytics_collection")
          );
      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
      x-codeSamples:
      - lang: Console
        source: 'DELETE _application/analytics/my_analytics_collection/

          '
      - lang: Python
        source: |-
          resp = client.search_application.delete_behavioral_analytics(
              name="my_analytics_collection",
          )
      - lang: JavaScript
        source: |-
          const response = await client.searchApplication.deleteBehavioralAnalytics({
            name: "my_analytics_collection",
          });
      - lang: Ruby
        source: |-
          response = client.search_application.delete_behavioral_analytics(
            name: "my_analytics_collection"
          )
      - lang: PHP
        source: |-
          $resp = $client->searchApplication()->deleteBehavioralAnalytics([
              "name" => "my_analytics_collection",
          ]);
      - 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
              .name("my_analytics_collection")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_application/search_application":
    get:
      tags:
      - search_application
      summary: Get search applications
      description: |
        Get information about search applications.

        ## Required authorization

        * Cluster privileges: `manage_search_application`
      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: |-
                    {
                      "count": 2,
                      "results": [
                        {
                          "name": "app-1",
                          "updated_at_millis": 1690981129366
                        },
                        {
                          "name": "app-2",
                          "updated_at_millis": 1691501823939
                        }
                      ]
                    }
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: 'GET _application/search_application?from=0&size=3&q=app*

          '
      - lang: Python
        source: |-
          resp = client.search_application.list(
              from="0",
              size="3",
              q="app*",
          )
      - lang: JavaScript
        source: |-
          const response = await client.searchApplication.list({
            from: 0,
            size: 3,
            q: "app*",
          });
      - lang: Ruby
        source: |-
          response = client.search_application.list(
            from: "0",
            size: "3",
            q: "app*"
          )
      - lang: PHP
        source: |-
          $resp = $client->searchApplication()->list([
              "from" => "0",
              "size" => "3",
              "q" => "app*",
          ]);
      - 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
              .from(0)
              .q("app*")
              .size(3)
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_application/search_application/{name}/_search":
    post:
      tags:
      - search_application
      summary: 'Run a search application search

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_application/search_application/{name}/_search</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_application/search_application/{name}/_search</span>\n
        \                     </div>\n                    \n\nGenerate 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:
      - "$ref": "#/components/parameters/search_application.search-name"
      - "$ref": "#/components/parameters/search_application.search-typed_keys"
      requestBody:
        "$ref": "#/components/requestBodies/search_application.search"
      responses:
        '200':
          "$ref": "#/components/responses/search_application.search-200"
      x-state: Beta
      x-codeSamples:
      - lang: Console
        source: |-
          POST _application/search_application/my-app/_search
          {
            "params": {
              "query_string": "my first query",
              "text_fields": [
                {"name": "title", "boost": 5},
                {"name": "description", "boost": 1}
              ]
            }
          }
      - lang: Python
        source: |-
          resp = client.search_application.search(
              name="my-app",
              params={
                  "query_string": "my first query",
                  "text_fields": [
                      {
                          "name": "title",
                          "boost": 5
                      },
                      {
                          "name": "description",
                          "boost": 1
                      }
                  ]
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.searchApplication.search({
            name: "my-app",
            params: {
              query_string: "my first query",
              text_fields: [
                {
                  name: "title",
                  boost: 5,
                },
                {
                  name: "description",
                  boost: 1,
                },
              ],
            },
          });
      - lang: Ruby
        source: |-
          response = client.search_application.search(
            name: "my-app",
            body: {
              "params": {
                "query_string": "my first query",
                "text_fields": [
                  {
                    "name": "title",
                    "boost": 5
                  },
                  {
                    "name": "description",
                    "boost": 1
                  }
                ]
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->searchApplication()->search([
              "name" => "my-app",
              "body" => [
                  "params" => [
                      "query_string" => "my first query",
                      "text_fields" => array(
                          [
                              "name" => "title",
                              "boost" => 5,
                          ],
                          [
                              "name" => "description",
                              "boost" => 1,
                          ],
                      ),
                  ],
              ],
          ]);
      - 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
              .name("my-app")
              .params(Map.of("text_fields", JsonData.fromJson("[{\"name\":\"title\",\"boost\":5},{\"name\":\"description\",\"boost\":1}]"),"query_string", JsonData.fromJson("\"my first query\"")))
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_mvt/{field}/{zoom}/{x}/{y}":
    get:
      tags:
      - search
      summary: 'Search a vector tile

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_mvt/{field}/{zoom}/{x}/{y}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_mvt/{field}/{zoom}/{x}/{y}</span>\n
        \                     </div>\n                    \n\nSearch 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 `<field>`. The query uses the `<zoom>/<x>/<y>` tile as a bounding box.\n*
        A `geotile_grid` or `geohex_grid` aggregation on the `<field>`. The `grid_agg`
        parameter determines the aggregation type. The aggregation uses the `<zoom>/<x>/<y>`
        tile as a bounding box.\n* Optionally, a `geo_bounds` aggregation on the `<field>`.
        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 `<field>` 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: `<zoom> + grid_precision`.\nFor example, if `<zoom>`
        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 `<zoom>` and `grid_precision` to calculate a
        final precision as follows: `<zoom> + 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
        `<zoom>` 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 `<zoom>` 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.\n\n## Required authorization\n\n* Index privileges: `read`\n"
      externalDocs:
        url: https://github.com/mapbox/vector-tile-spec/blob/master/README.md
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-vector-tile-api.html
      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-track_total_hits"
      - "$ref": "#/components/parameters/search_mvt-with_labels"
      requestBody:
        "$ref": "#/components/requestBodies/search_mvt"
      responses:
        '200':
          "$ref": "#/components/responses/search_mvt-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          GET museums/_mvt/location/13/4207/2692
          {
            "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"
                }
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.search_mvt(
              index="museums",
              field="location",
              zoom="13",
              x="4207",
              y="2692",
              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"
                      }
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.searchMvt({
            index: "museums",
            field: "location",
            zoom: 13,
            x: 4207,
            y: 2692,
            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",
                },
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.search_mvt(
            index: "museums",
            field: "location",
            zoom: "13",
            x: "4207",
            y: "2692",
            body: {
              "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"
                  }
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->searchMvt([
              "index" => "museums",
              "field" => "location",
              "zoom" => "13",
              "x" => "4207",
              "y" => "2692",
              "body" => [
                  "grid_agg" => "geotile",
                  "grid_precision" => 2,
                  "fields" => array(
                      "name",
                      "price",
                  ),
                  "query" => [
                      "term" => [
                          "included" => true,
                      ],
                  ],
                  "aggs" => [
                      "min_price" => [
                          "min" => [
                              "field" => "price",
                          ],
                      ],
                      "max_price" => [
                          "max" => [
                              "field" => "price",
                          ],
                      ],
                      "avg_price" => [
                          "avg" => [
                              "field" => "price",
                          ],
                      ],
                  ],
              ],
          ]);
      - 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
              .aggs(Map.of("max_price", Aggregation.of(a -> a
                      .max(m -> m
                          .field("price")
                      )
                  ),"min_price", Aggregation.of(ag -> ag
                      .min(m -> m
                          .field("price")
                      )
                  ),"avg_price", Aggregation.of(agg -> agg
                      .avg(av -> av
                          .field("price")
                      )
                  )))
              .field("location")
              .fields(List.of("name","price"))
              .gridAgg(GridAggregationType.Geotile)
              .gridPrecision(2)
              .index("museums")
              .query(q -> q
                  .term(t -> t
                      .field("included")
                      .value(FieldValue.of(true))
                  )
              )
              .x(4207)
              .y(2692)
              .zoom(13)
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_search/template":
    post:
      tags:
      - search
      summary: 'Run a search with a search template

        '
      description: |
        **All methods and paths for this operation:**

        <div>
                              <span class="operation-verb get">GET</span>
                              <span class="operation-path">/_search/template</span>
                              </div>
                            <div>
                              <span class="operation-verb post">POST</span>
                              <span class="operation-path">/_search/template</span>
                              </div>
                            <div>
                              <span class="operation-verb get">GET</span>
                              <span class="operation-path">/{index}/_search/template</span>
                              </div>
                            <div>
                              <span class="operation-verb post">POST</span>
                              <span class="operation-path">/{index}/_search/template</span>
                              </div>

        ## Required authorization

        * Index privileges: `read`
      externalDocs:
        url: https://www.elastic.co/docs/solutions/search/search-templates
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/search-template-api.html
      operationId: search-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"
      - "$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"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          GET my-index/_search/template
          {
            "id": "my-search-template",
            "params": {
              "query_string": "hello world",
              "from": 0,
              "size": 10
            }
          }
      - lang: Python
        source: |-
          resp = client.search_template(
              index="my-index",
              id="my-search-template",
              params={
                  "query_string": "hello world",
                  "from": 0,
                  "size": 10
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.searchTemplate({
            index: "my-index",
            id: "my-search-template",
            params: {
              query_string: "hello world",
              from: 0,
              size: 10,
            },
          });
      - lang: Ruby
        source: |-
          response = client.search_template(
            index: "my-index",
            body: {
              "id": "my-search-template",
              "params": {
                "query_string": "hello world",
                "from": 0,
                "size": 10
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->searchTemplate([
              "index" => "my-index",
              "body" => [
                  "id" => "my-search-template",
                  "params" => [
                      "query_string" => "hello world",
                      "from" => 0,
                      "size" => 10,
                  ],
              ],
          ]);
      - 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
              .id("my-search-template")
              .index("my-index")
              .params(Map.of("size", JsonData.fromJson("10"),"from", JsonData.fromJson("0"),"query_string", JsonData.fromJson("\"hello world\"")))
          );
      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.
        Include the user information in a [basic auth header](https://en.wikipedia.org/wiki/Basic_access_authentication).
        A 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.
        If 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
                    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: |-
                    {
                      "username": "rdeniro",
                      "roles": [
                        "admin"
                      ],
                      "full_name": null,
                      "email":  null,
                      "metadata": { },
                      "enabled": true,
                      "authentication_realm": {
                        "name" : "file",
                        "type" : "file"
                      },
                      "lookup_realm": {
                        "name" : "file",
                        "type" : "file"
                      },
                      "authentication_type": "realm"
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_security/_authenticate

          '
      - 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();

          '
      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.
        NOTE: If you have only the `manage_own_api_key` privilege, this API returns only the API keys that you own.
        If you have `read_security`, `manage_api_key` or greater privileges (including `manage_security`), this API returns all API keys regardless of ownership.

        ## Required authorization

        * Cluster privileges: `manage_own_api_key`,`read_security`
      operationId: security-get-api-key
      parameters:
      - in: query
        name: id
        description: |-
          An API key id.
          This 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.
          This parameter cannot be used with any of `id`, `realm_name` or `username`.
          It 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.
          The `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.
          This 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.
          This 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
          associated with the API key. An API key's actual
          permission is the intersection of its assigned role
          descriptors and the owner user's role descriptors.
        deprecated: false
        schema:
          type: boolean
        x-state: Generally available
        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
        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
        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.

                    '
                  value: |-
                    {
                      "api_keys": [
                        {
                          "id": "0GF5GXsBCXxz2eDxWwFN",
                          "name": "hadoop_myuser_key",
                          "creation": 1548550550158,
                          "expiration": 1548551550158,
                          "invalidated": false,
                          "username": "myuser",
                          "realm": "native1",
                          "realm_type": "native",
                          "metadata": {
                            "application": "myapp"
                          },
                          "role_descriptors": {
                            "role-a": {
                              "cluster": [
                                "monitor"
                              ],
                              "indices": [
                                {
                                  "names": [
                                    "index-a"
                                  ],
                                  "privileges": [
                                    "read"
                                  ],
                                  "allow_restricted_indices": false
                                }
                              ],
                              "applications": [ ],
                              "run_as": [ ],
                              "metadata": { },
                              "transient_metadata": {
                                "enabled": true
                              }
                            }
                          }
                        },
                        {
                          "id": "6wHJmcQpReKBa42EHV5SBw",
                          "name": "api-key-name-2",
                          "creation": 1548550550158,
                          "invalidated": false,
                          "username": "user-y",
                          "realm": "realm-2",
                          "metadata": {},
                          "role_descriptors": { }
                        }
                      ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_security/api_key?username=myuser&realm_name=native1

          '
      - lang: Python
        source: |-
          resp = client.security.get_api_key(
              username="myuser",
              realm_name="native1",
          )
      - lang: JavaScript
        source: |-
          const response = await client.security.getApiKey({
            username: "myuser",
            realm_name: "native1",
          });
      - lang: Ruby
        source: |-
          response = client.security.get_api_key(
            username: "myuser",
            realm_name: "native1"
          )
      - lang: PHP
        source: |-
          $resp = $client->security()->getApiKey([
              "username" => "myuser",
              "realm_name" => "native1",
          ]);
      - 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
              .realmName("native1")
              .username("myuser")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    post:
      tags:
      - security
      summary: 'Create an API key

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/_security/api_key</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_security/api_key</span>\n
        \                     </div>\n                    \n\nCreate 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.\n\n## Required authorization\n\n*
        Cluster privileges: `manage_own_api_key`\n"
      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.18/security-api-create-api-key.html
      operationId: security-create-api-key
      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"
      x-state: Generally available
      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(
              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"
                      ]
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.security.createApiKey({
            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"],
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.security.create_api_key(
            body: {
              "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"
                  ]
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->security()->createApiKey([
              "body" => [
                  "name" => "my-api-key",
                  "expiration" => "1d",
                  "role_descriptors" => [
                      "role-a" => [
                          "cluster" => array(
                              "all",
                          ),
                          "indices" => array(
                              [
                                  "names" => array(
                                      "index-a*",
                                  ),
                                  "privileges" => array(
                                      "read",
                                  ),
                              ],
                          ),
                      ],
                      "role-b" => [
                          "cluster" => array(
                              "all",
                          ),
                          "indices" => array(
                              [
                                  "names" => array(
                                      "index-b*",
                                  ),
                                  "privileges" => array(
                                      "all",
                                  ),
                              ],
                          ),
                      ],
                  ],
                  "metadata" => [
                      "application" => "my-application",
                      "environment" => [
                          "level" => 1,
                          "trusted" => true,
                          "tags" => array(
                              "dev",
                              "staging",
                          ),
                      ],
                  ],
              ],
          ]);
      - 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
              .expiration(e -> e
                  .time("1d")
              )
              .metadata(Map.of("environment", JsonData.fromJson("{\"level\":1,\"trusted\":true,\"tags\":[\"dev\",\"staging\"]}"),"application", JsonData.fromJson("\"my-application\"")))
              .name("my-api-key")
              .roleDescriptors(Map.of("role-b", RoleDescriptor.of(r -> r
                      .cluster("all")
                      .indices(i -> i
                          .names("index-b*")
                          .privileges("all")
                      )
                  ),"role-a", RoleDescriptor.of(r -> r
                      .cluster("all")
                      .indices(i -> i
                          .names("index-a*")
                          .privileges("read")
                      )
                  )))
          );
      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.
        Invalidated 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.

        To use this API, you must have at least the `manage_security`, `manage_api_key`, or `manage_own_api_key` cluster privileges.
        The `manage_security` privilege allows deleting any API key, including both REST and cross cluster API keys.
        The `manage_api_key` privilege allows deleting any REST API key, but not cross cluster API keys.
        The `manage_own_api_key` only allows deleting REST API keys that are owned by the user.
        In addition, with the `manage_own_api_key` privilege, an invalidation request must be issued in one of the three formats:

        - Set the parameter `owner=true`.
        - Or, set both `username` and `realm_name` to match the user's identity.
        - 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.

        ## Required authorization

        * Cluster privileges: `manage_api_key`,`manage_own_api_key`
      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.
                    This 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.
                    This 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.
                    The `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.

                    NOTE: 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.
                    This 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.
                    This 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: |-
                  {
                    "ids" : [ "VuaCfGcBCdbkQm-e5aOx" ]
                  }
              SecurityInvalidateApiKeyRequestExample2:
                summary: API keys by name
                description: Run `DELETE /_security/api_key` to invalidate the API
                  keys identified by name.
                value: |-
                  {
                    "name" : "my-api-key"
                  }
              SecurityInvalidateApiKeyRequestExample3:
                summary: API keys by realm
                description: Run `DELETE /_security/api_key` to invalidate all API
                  keys for the `native1` realm.
                value: |-
                  {
                    "realm_name" : "native1"
                  }
              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: |-
                  {
                    "username" : "myuser"
                  }
              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: |-
                  {
                    "ids" : ["VuaCfGcBCdbkQm-e5aOx"],
                    "owner" : "true"
                  }
              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: |-
                  {
                    "username" : "myuser",
                    "realm_name" : "native1"
                  }
        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.
                      This 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`.

                    '
                  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
      x-codeSamples:
      - lang: Console
        source: |-
          DELETE /_security/api_key
          {
            "ids" : [ "VuaCfGcBCdbkQm-e5aOx" ]
          }
      - lang: Python
        source: |-
          resp = client.security.invalidate_api_key(
              ids=[
                  "VuaCfGcBCdbkQm-e5aOx"
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.security.invalidateApiKey({
            ids: ["VuaCfGcBCdbkQm-e5aOx"],
          });
      - lang: Ruby
        source: |-
          response = client.security.invalidate_api_key(
            body: {
              "ids": [
                "VuaCfGcBCdbkQm-e5aOx"
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->security()->invalidateApiKey([
              "body" => [
                  "ids" => array(
                      "VuaCfGcBCdbkQm-e5aOx",
                  ),
              ],
          ]);
      - 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
              .ids("VuaCfGcBCdbkQm-e5aOx")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_security/role/{name}":
    get:
      tags:
      - security
      summary: 'Get roles

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_security/role</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_security/role/{name}</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n## Required authorization\n\n*
        Cluster privileges: `read_security`\n"
      operationId: security-get-role
      parameters:
      - "$ref": "#/components/parameters/security.get_role-name"
      responses:
        '200':
          "$ref": "#/components/responses/security.get_role-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_security/role/my_admin_role

          '
      - lang: Python
        source: |-
          resp = client.security.get_role(
              name="my_admin_role",
          )
      - lang: JavaScript
        source: |-
          const response = await client.security.getRole({
            name: "my_admin_role",
          });
      - lang: Ruby
        source: |-
          response = client.security.get_role(
            name: "my_admin_role"
          )
      - lang: PHP
        source: |-
          $resp = $client->security()->getRole([
              "name" => "my_admin_role",
          ]);
      - 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
              .name("my_admin_role")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    post:
      tags:
      - security
      summary: 'Create or update roles

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb put\">PUT</span>\n                      <span class=\"operation-path\">/_security/role/{name}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_security/role/{name}</span>\n
        \                     </div>\n                    \n\nThe 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.\n\n## Required authorization\n\n*
        Cluster privileges: `manage_security`\n"
      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.18/security-api-put-role.html
      operationId: security-put-role
      parameters:
      - "$ref": "#/components/parameters/security.put_role-name"
      - "$ref": "#/components/parameters/security.put_role-refresh"
      requestBody:
        "$ref": "#/components/requestBodies/security.put_role"
      responses:
        '200':
          "$ref": "#/components/responses/security.put_role-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST /_security/role/my_admin_role
          {
            "description": "Grants full access to all management features within the cluster.",
            "cluster": ["all"],
            "indices": [
              {
                "names": [ "index1", "index2" ],
                "privileges": ["all"],
                "field_security" : { // optional
                  "grant" : [ "title", "body" ]
                },
                "query": "{\"match\": {\"title\": \"foo\"}}" // optional
              }
            ],
            "applications": [
              {
                "application": "myapp",
                "privileges": [ "admin", "read" ],
                "resources": [ "*" ]
              }
            ],
            "run_as": [ "other_user" ], // optional
            "metadata" : { // optional
              "version" : 1
            }
          }
      - lang: Python
        source: |-
          resp = client.security.put_role(
              name="my_admin_role",
              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
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.security.putRole({
            name: "my_admin_role",
            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,
            },
          });
      - lang: Ruby
        source: |-
          response = client.security.put_role(
            name: "my_admin_role",
            body: {
              "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
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->security()->putRole([
              "name" => "my_admin_role",
              "body" => [
                  "description" => "Grants full access to all management features within the cluster.",
                  "cluster" => array(
                      "all",
                  ),
                  "indices" => array(
                      [
                          "names" => array(
                              "index1",
                              "index2",
                          ),
                          "privileges" => array(
                              "all",
                          ),
                          "field_security" => [
                              "grant" => array(
                                  "title",
                                  "body",
                              ),
                          ],
                          "query" => "{\"match\": {\"title\": \"foo\"}}",
                      ],
                  ),
                  "applications" => array(
                      [
                          "application" => "myapp",
                          "privileges" => array(
                              "admin",
                              "read",
                          ),
                          "resources" => array(
                              "*",
                          ),
                      ],
                  ),
                  "run_as" => array(
                      "other_user",
                  ),
                  "metadata" => [
                      "version" => 1,
                  ],
              ],
          ]);
      - 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
              .applications(a -> a
                  .application("myapp")
                  .privileges(List.of("admin","read"))
                  .resources("*")
              )
              .cluster("all")
              .description("Grants full access to all management features within the cluster.")
              .indices(i -> i
                  .fieldSecurity(f -> f
                      .grant(List.of("title","body"))
                  )
                  .names(List.of("index1","index2"))
                  .privileges("all")
                  .query(q -> q
                      .match(m -> m
                          .field("title")
                          .query(FieldValue.of("foo"))
                      )
                  )
              )
              .metadata("version", JsonData.fromJson("1"))
              .name("my_admin_role")
              .runAs("other_user")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - security
      summary: Delete roles
      description: |
        Delete roles in the native realm.
        The role management APIs are generally the preferred way to manage roles, rather than using file-based role management.
        The delete roles API cannot remove roles that are defined in roles files.

        ## Required authorization

        * Cluster privileges: `manage_security`
      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`.
                      Otherwise, `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`.

                    '
                  value: |-
                    {
                      "found" : true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE /_security/role/my_admin_role

          '
      - lang: Python
        source: |-
          resp = client.security.delete_role(
              name="my_admin_role",
          )
      - lang: JavaScript
        source: |-
          const response = await client.security.deleteRole({
            name: "my_admin_role",
          });
      - lang: Ruby
        source: |-
          response = client.security.delete_role(
            name: "my_admin_role"
          )
      - lang: PHP
        source: |-
          $resp = $client->security()->deleteRole([
              "name" => "my_admin_role",
          ]);
      - 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
              .name("my_admin_role")
          );
      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.

        ## Required authorization

        * Cluster privileges: `manage_security`
      externalDocs:
        url: https://www.elastic.co/docs/reference/elasticsearch/security-privileges
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/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"
                required:
                - cluster
                - index
              examples:
                SecurityGetBuiltinPrivilegesResponseExample1:
                  description: A successful response from `GET /_security/privilege/_builtin`.
                  value: |-
                    {
                      "cluster" : [
                        "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_connector",
                        "manage_data_frame_transforms",
                        "manage_data_stream_global_retention",
                        "manage_enrich",
                        "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_connector",
                        "monitor_data_frame_transforms",
                        "monitor_data_stream_global_retention",
                        "monitor_enrich",
                        "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_connector_secrets",
                        "read_fleet_secrets",
                        "read_ilm",
                        "read_pipeline",
                        "read_security",
                        "read_slm",
                        "transport_client",
                        "write_connector_secrets",
                        "write_fleet_secrets"
                      ],
                      "index" : [
                        "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"
                      ],
                      "remote_cluster" : [
                        "monitor_enrich",
                        "monitor_stats"
                      ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET /_security/privilege/_builtin

          '
      - 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();

          '
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_security/user/{user}/_has_privileges":
    post:
      tags:
      - security
      summary: 'Check user privileges

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_security/user/_has_privileges</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_security/user/_has_privileges</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_security/user/{user}/_has_privileges</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_security/user/{user}/_has_privileges</span>\n
        \                     </div>\n                    \n\nDetermine 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.18/security-api-has-privileges.html
      operationId: security-has-privileges
      parameters:
      - "$ref": "#/components/parameters/security.has_privileges-user"
      requestBody:
        "$ref": "#/components/requestBodies/security.has_privileges"
      responses:
        '200':
          "$ref": "#/components/responses/security.has_privileges-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          GET /_security/user/_has_privileges
          {
            "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" ]
              }
            ]
          }
      - lang: Python
        source: |-
          resp = client.security.has_privileges(
              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"
                      ]
                  }
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.security.hasPrivileges({
            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"],
              },
            ],
          });
      - lang: Ruby
        source: |-
          response = client.security.has_privileges(
            body: {
              "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"
                  ]
                }
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->security()->hasPrivileges([
              "body" => [
                  "cluster" => array(
                      "monitor",
                      "manage",
                  ),
                  "index" => array(
                      [
                          "names" => array(
                              "suppliers",
                              "products",
                          ),
                          "privileges" => array(
                              "read",
                          ),
                      ],
                      [
                          "names" => array(
                              "inventory",
                          ),
                          "privileges" => array(
                              "read",
                              "write",
                          ),
                      ],
                  ),
                  "application" => array(
                      [
                          "application" => "inventory_manager",
                          "privileges" => array(
                              "read",
                              "data:write/inventory",
                          ),
                          "resources" => array(
                              "product/1852563",
                          ),
                      ],
                  ),
              ],
          ]);
      - 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
              .application(a -> a
                  .application("inventory_manager")
                  .privileges(List.of("read","data:write/inventory"))
                  .resources("product/1852563")
              )
              .cluster(List.of("monitor","manage"))
              .index(List.of(IndexPrivilegesCheck.of(i -> i
                      .names(List.of("suppliers","products"))
                      .privileges("read")
                  ),IndexPrivilegesCheck.of(i -> i
                      .names("inventory")
                      .privileges(List.of("read","write"))
                  )))
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_security/_query/api_key":
    post:
      tags:
      - security
      summary: 'Find API keys with a query

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_security/_query/api_key</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_security/_query/api_key</span>\n
        \                     </div>\n                    \n\nGet 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:\n\n## Required authorization\n\n*
        Cluster privileges: `manage_own_api_key`,`read_security`\n"
      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.18/security-api-query-api-key.html
      operationId: security-query-api-keys
      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: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          GET /_security/_query/api_key?with_limited_by=true
          {
            "query": {
              "ids": {
                "values": [
                  "VuaCfGcBCdbkQm-e5aOx"
                ]
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.security.query_api_keys(
              with_limited_by=True,
              query={
                  "ids": {
                      "values": [
                          "VuaCfGcBCdbkQm-e5aOx"
                      ]
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.security.queryApiKeys({
            with_limited_by: "true",
            query: {
              ids: {
                values: ["VuaCfGcBCdbkQm-e5aOx"],
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.security.query_api_keys(
            with_limited_by: "true",
            body: {
              "query": {
                "ids": {
                  "values": [
                    "VuaCfGcBCdbkQm-e5aOx"
                  ]
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->security()->queryApiKeys([
              "with_limited_by" => "true",
              "body" => [
                  "query" => [
                      "ids" => [
                          "values" => array(
                              "VuaCfGcBCdbkQm-e5aOx",
                          ),
                      ],
                  ],
              ],
          ]);
      - 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
              .query(qu -> qu
                  .ids(i -> i
                      .values("VuaCfGcBCdbkQm-e5aOx")
                  )
              )
              .withLimitedBy(true)
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_security/_query/role":
    post:
      tags:
      - security
      summary: 'Find roles with a query

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_security/_query/role</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_security/_query/role</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n## Required authorization\n\n* Cluster privileges:
        `read_security`\n"
      operationId: security-query-role
      requestBody:
        "$ref": "#/components/requestBodies/security.query_role"
      responses:
        '200':
          "$ref": "#/components/responses/security.query_role-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST /_security/_query/role
          {
              "sort": ["name"]
          }
      - lang: Python
        source: |-
          resp = client.security.query_role(
              sort=[
                  "name"
              ],
          )
      - lang: JavaScript
        source: |-
          const response = await client.security.queryRole({
            sort: ["name"],
          });
      - lang: Ruby
        source: |-
          response = client.security.query_role(
            body: {
              "sort": [
                "name"
              ]
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->security()->queryRole([
              "body" => [
                  "sort" => array(
                      "name",
                  ),
              ],
          ]);
      - 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
              .sort(s -> s
                  .field(f -> f
                      .field("name")
                  )
              )
          );
      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.
        This API supports updates to an API key's access scope, expiration, and metadata.

        To use this API, you must have at least the `manage_own_api_key` cluster privilege.
        Users can only update API keys that they created or that were granted to them.
        To update another user’s API key, use the `run_as` feature to submit a request on behalf of another user.

        IMPORTANT: It's not possible to use an API key as the authentication credential for this API. The owner user’s credentials are required.

        Use this API to update API keys created by the create API key or grant API Key APIs.
        If you need to apply the same update to many API keys, you can use the bulk update API keys API to reduce overhead.
        It's not possible to update expired API keys or API keys that have been invalidated by the invalidate API key API.

        The 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.
        The snapshot of the owner's permissions is updated automatically on every call.

        IMPORTANT: If you don't specify `role_descriptors` in the request, a call to this API might still change the 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.

        ## Required authorization

        * Cluster privileges: `manage_own_api_key`
      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.
                    The API key's effective permissions are an intersection of its assigned privileges and the point in time snapshot of permissions of the owner user.
                    You can assign new privileges by specifying them in this parameter.
                    To remove assigned privileges, you can supply an empty `role_descriptors` parameter, that is to say, an empty object `{}`.
                    If an API key has no assigned privileges, it inherits the owner user's full permissions.
                    The snapshot of the owner's permissions is always updated, whether you supply the `role_descriptors` parameter or not.
                    The 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.
                    It supports a nested data structure.
                    Within the metadata object, keys beginning with `_` are reserved for system usage.
                    When 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.
                    By default, API keys never expire.
                    This 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.

                  '
                value: |-
                  {
                    "role_descriptors": {
                      "role-a": {
                        "indices": [
                          {
                            "names": ["*"],
                            "privileges": ["write"]
                          }
                        ]
                      }
                    },
                    "metadata": {
                      "environment": {
                        "level": 2,
                        "trusted": true,
                        "tags": ["production"]
                      }
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "role_descriptors": {}
                  }
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  updated:
                    description: |-
                      If `true`, the API key was updated.
                      If `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.

                    '
                  value: |-
                    {
                      "updated": true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT /_security/api_key/VuaCfGcBCdbkQm-e5aOx
          {
            "role_descriptors": {
              "role-a": {
                "indices": [
                  {
                    "names": ["*"],
                    "privileges": ["write"]
                  }
                ]
              }
            },
            "metadata": {
              "environment": {
                "level": 2,
                "trusted": true,
                "tags": ["production"]
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.security.update_api_key(
              id="VuaCfGcBCdbkQm-e5aOx",
              role_descriptors={
                  "role-a": {
                      "indices": [
                          {
                              "names": [
                                  "*"
                              ],
                              "privileges": [
                                  "write"
                              ]
                          }
                      ]
                  }
              },
              metadata={
                  "environment": {
                      "level": 2,
                      "trusted": True,
                      "tags": [
                          "production"
                      ]
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.security.updateApiKey({
            id: "VuaCfGcBCdbkQm-e5aOx",
            role_descriptors: {
              "role-a": {
                indices: [
                  {
                    names: ["*"],
                    privileges: ["write"],
                  },
                ],
              },
            },
            metadata: {
              environment: {
                level: 2,
                trusted: true,
                tags: ["production"],
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.security.update_api_key(
            id: "VuaCfGcBCdbkQm-e5aOx",
            body: {
              "role_descriptors": {
                "role-a": {
                  "indices": [
                    {
                      "names": [
                        "*"
                      ],
                      "privileges": [
                        "write"
                      ]
                    }
                  ]
                }
              },
              "metadata": {
                "environment": {
                  "level": 2,
                  "trusted": true,
                  "tags": [
                    "production"
                  ]
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->security()->updateApiKey([
              "id" => "VuaCfGcBCdbkQm-e5aOx",
              "body" => [
                  "role_descriptors" => [
                      "role-a" => [
                          "indices" => array(
                              [
                                  "names" => array(
                                      "*",
                                  ),
                                  "privileges" => array(
                                      "write",
                                  ),
                              ],
                          ),
                      ],
                  ],
                  "metadata" => [
                      "environment" => [
                          "level" => 2,
                          "trusted" => true,
                          "tags" => array(
                              "production",
                          ),
                      ],
                  ],
              ],
          ]);
      - 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
              .id("VuaCfGcBCdbkQm-e5aOx")
              .metadata("environment", JsonData.fromJson("{\"level\":2,\"trusted\":true,\"tags\":[\"production\"]}"))
              .roleDescriptors("role-a", r -> r
                  .indices(i -> i
                      .names("*")
                      .privileges("write")
                  )
              )
          );
      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: |-
                  {
                    "cursor": "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8="
                  }
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  succeeded:
                    type: boolean
                required:
                - succeeded
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _sql/close
          {
            "cursor": "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8="
          }
      - lang: Python
        source: |-
          resp = client.sql.clear_cursor(
              cursor="sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=",
          )
      - lang: JavaScript
        source: |-
          const response = await client.sql.clearCursor({
            cursor:
              "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=",
          });
      - lang: Ruby
        source: |-
          response = client.sql.clear_cursor(
            body: {
              "cursor": "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8="
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->sql()->clearCursor([
              "body" => [
                  "cursor" => "sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=",
              ],
          ]);
      - 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
              .cursor("sDXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAAEWYUpOYklQMHhRUEtld3RsNnFtYU1hQQ==:BAFmBGRhdGUBZgVsaWtlcwFzB21lc3NhZ2UBZgR1c2Vy9f///w8=")
          );
      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.
        If the search is still running, the API cancels it.

        If the Elasticsearch security features are enabled, only the following users can use this API to delete a search:

        * Users with the `cancel_task` cluster privilege.
        * The user who first submitted the search.

        ## Required authorization

        * Cluster privileges: `cancel_task`
      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
      x-codeSamples:
      - lang: Console
        source: 'DELETE _sql/async/delete/FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=

          '
      - lang: Python
        source: |-
          resp = client.sql.delete_async(
              id="FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=",
          )
      - lang: JavaScript
        source: |-
          const response = await client.sql.deleteAsync({
            id: "FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=",
          });
      - lang: Ruby
        source: |-
          response = client.sql.delete_async(
            id: "FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI="
          )
      - lang: PHP
        source: |-
          $resp = $client->sql()->deleteAsync([
              "id" => "FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=",
          ]);
      - 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
              .id("FmdMX2pIang3UWhLRU5QS0lqdlppYncaMUpYQ05oSkpTc3kwZ21EdC1tbFJXQToxOTI=")
          );
      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.

        If 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.
          The 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.
          You must specify a format using this parameter or the `Accept` HTTP header.
          If 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.
          It 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.
          It 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.
                      This value is returned only for async and saved synchronous searches.
                      For 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.
                      If `false`, the search has finished.
                      This value is returned only for async and saved synchronous searches.
                      For 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.
                      If `is_partial` is `true` and `is_running` is `true`, the search is still running.
                      If `is_partial` is `true` but `is_running` is `false`, the results are partial due to a failure or timeout.
                      This value is returned only for async and saved synchronous searches.
                      For 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.
                      For 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
      x-codeSamples:
      - lang: Console
        source: 'GET _sql/async/FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=?wait_for_completion_timeout=2s&format=json

          '
      - lang: Python
        source: |-
          resp = client.sql.get_async(
              id="FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=",
              wait_for_completion_timeout="2s",
              format="json",
          )
      - lang: JavaScript
        source: |-
          const response = await client.sql.getAsync({
            id: "FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=",
            wait_for_completion_timeout: "2s",
            format: "json",
          });
      - lang: Ruby
        source: |-
          response = client.sql.get_async(
            id: "FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=",
            wait_for_completion_timeout: "2s",
            format: "json"
          )
      - lang: PHP
        source: |-
          $resp = $client->sql()->getAsync([
              "id" => "FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=",
              "wait_for_completion_timeout" => "2s",
              "format" => "json",
          ]);
      - 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
              .format("json")
              .id("FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=")
              .waitForCompletionTimeout(w -> w
                  .offset(2)
              )
          );
      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.

        ## Required authorization

        * Cluster privileges: `monitor`
      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.
                      If `false`, the search has finished.
                    type: boolean
                  is_partial:
                    description: |-
                      If `true`, the response does not contain complete search results.
                      If `is_partial` is `true` and `is_running` is `true`, the search is still running.
                      If `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.
                      The API returns this property only for running searches.
                    allOf:
                    - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
                  completion_status:
                    description: |-
                      The HTTP status code for the search.
                      The 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
      x-codeSamples:
      - lang: Console
        source: 'GET _sql/async/status/FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=

          '
      - lang: Python
        source: |-
          resp = client.sql.get_async_status(
              id="FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=",
          )
      - lang: JavaScript
        source: |-
          const response = await client.sql.getAsyncStatus({
            id: "FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=",
          });
      - lang: Ruby
        source: |-
          response = client.sql.get_async_status(
            id: "FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU="
          )
      - lang: PHP
        source: |-
          $resp = $client->sql()->getAsyncStatus([
              "id" => "FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=",
          ]);
      - 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
              .id("FnR0TDhyWUVmUmVtWXRWZER4MXZiNFEad2F5UDk2ZVdTVHV1S0xDUy00SklUdzozMTU=")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_sql":
    get:
      tags:
      - sql
      summary: 'Get SQL search results

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_sql</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_sql</span>\n
        \                     </div>\n                    \n\nRun an SQL request.\n\n##
        Required authorization\n\n* Index privileges: `read`\n"
      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: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _sql?format=txt
          {
            "query": "SELECT * FROM library ORDER BY page_count DESC LIMIT 5"
          }
      - lang: Python
        source: |-
          resp = client.sql.query(
              format="txt",
              query="SELECT * FROM library ORDER BY page_count DESC LIMIT 5",
          )
      - lang: JavaScript
        source: |-
          const response = await client.sql.query({
            format: "txt",
            query: "SELECT * FROM library ORDER BY page_count DESC LIMIT 5",
          });
      - lang: Ruby
        source: |-
          response = client.sql.query(
            format: "txt",
            body: {
              "query": "SELECT * FROM library ORDER BY page_count DESC LIMIT 5"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->sql()->query([
              "format" => "txt",
              "body" => [
                  "query" => "SELECT * FROM library ORDER BY page_count DESC LIMIT 5",
              ],
          ]);
      - 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
              .format(SqlFormat.Txt)
              .query("SELECT * FROM library ORDER BY page_count DESC LIMIT 5")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_sql/translate":
    get:
      tags:
      - sql
      summary: 'Translate SQL into Elasticsearch queries

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_sql/translate</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_sql/translate</span>\n
        \                     </div>\n                    \n\nTranslate 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`.\n\n## Required
        authorization\n\n* Index privileges: `read`\n"
      operationId: sql-translate
      requestBody:
        "$ref": "#/components/requestBodies/sql.translate"
      responses:
        '200':
          "$ref": "#/components/responses/sql.translate-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _sql/translate
          {
            "query": "SELECT * FROM library ORDER BY page_count DESC",
            "fetch_size": 10
          }
      - lang: Python
        source: |-
          resp = client.sql.translate(
              query="SELECT * FROM library ORDER BY page_count DESC",
              fetch_size=10,
          )
      - lang: JavaScript
        source: |-
          const response = await client.sql.translate({
            query: "SELECT * FROM library ORDER BY page_count DESC",
            fetch_size: 10,
          });
      - lang: Ruby
        source: |-
          response = client.sql.translate(
            body: {
              "query": "SELECT * FROM library ORDER BY page_count DESC",
              "fetch_size": 10
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->sql()->translate([
              "body" => [
                  "query" => "SELECT * FROM library ORDER BY page_count DESC",
                  "fetch_size" => 10,
              ],
          ]);
      - 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
              .fetchSize(10)
              .query("SELECT * FROM library ORDER BY page_count DESC")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_synonyms/{id}":
    get:
      tags:
      - synonyms
      summary: Get a synonym set
      description: |2


        ## Required authorization

        * Cluster privileges: `manage_search_synonyms`
      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: |-
                    {
                      "count": 3,
                      "synonyms_set": [
                        {
                          "id": "test-1",
                          "synonyms": "hello, hi"
                        },
                        {
                          "id": "test-2",
                          "synonyms": "bye, goodbye"
                        },
                        {
                          "id": "test-3",
                          "synonyms": "test => check"
                        }
                      ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _synonyms/my-synonyms-set

          '
      - lang: Python
        source: |-
          resp = client.synonyms.get_synonym(
              id="my-synonyms-set",
          )
      - lang: JavaScript
        source: |-
          const response = await client.synonyms.getSynonym({
            id: "my-synonyms-set",
          });
      - lang: Ruby
        source: |-
          response = client.synonyms.get_synonym(
            id: "my-synonyms-set"
          )
      - lang: PHP
        source: |-
          $resp = $client->synonyms()->getSynonym([
              "id" => "my-synonyms-set",
          ]);
      - 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
              .id("my-synonyms-set")
          );
      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.
        If you need to manage more synonym rules, you can create multiple synonym sets.

        When an existing synonyms set is updated, the search analyzers that use the synonyms set are reloaded automatically for all indices.
        This is equivalent to invoking the reload search analyzers API for all indices that use the synonyms set.

        For practical examples of how to create or update a synonyms set, refer to the External documentation.

        ## Required authorization

        * Cluster privileges: `manage_search_synonyms`
      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.18/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
      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: |2-

                  {
                    "synonyms_set": {
                    "synonyms" : "hello, hi, howdy"
                    }
                  }
        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.
                      This information is the analyzers reloading result.
                    allOf:
                    - "$ref": "#/components/schemas/indices.reload_search_analyzers.ReloadResult"
                required:
                - result
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _synonyms/my-synonyms-set

          {
            "synonyms_set": {
            "synonyms" : "hello, hi, howdy"
            }
          }
      - lang: Python
        source: |-
          resp = client.synonyms.put_synonym(
              id="my-synonyms-set",
              synonyms_set={
                  "synonyms": "hello, hi, howdy"
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.synonyms.putSynonym({
            id: "my-synonyms-set",
            synonyms_set: {
              synonyms: "hello, hi, howdy",
            },
          });
      - lang: Ruby
        source: |-
          response = client.synonyms.put_synonym(
            id: "my-synonyms-set",
            body: {
              "synonyms_set": {
                "synonyms": "hello, hi, howdy"
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->synonyms()->putSynonym([
              "id" => "my-synonyms-set",
              "body" => [
                  "synonyms_set" => [
                      "synonyms" => "hello, hi, howdy",
                  ],
              ],
          ]);
      - 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
              .id("my-synonyms-set")
              .synonymsSet(s -> s
                  .synonyms("hello, hi, howdy")
              )
          );
      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.

        Synonyms sets can be used in synonym graph token filters and synonym token filters.
        These synonym filters can be used as part of search analyzers.

        Analyzers need to be loaded when an index is restored (such as when a node starts, or the index becomes open).
        Even if the analyzer is not used on any field mapping, it still needs to be loaded on the index recovery phase.

        If any analyzers cannot be loaded, the index becomes unavailable and the cluster status becomes red or yellow as index shards are not available.
        To prevent that, synonyms sets that are used in analyzers can't be deleted.
        A delete request in this case will return a 400 response code.

        To remove a synonyms set, you must first remove all indices that contain analyzers using it.
        You 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.
        Once finished, you can delete the index.
        When the synonyms set is not used in analyzers, you will be able to delete it.

        ## Required authorization

        * Cluster privileges: `manage_search_synonyms`
      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
      x-codeSamples:
      - lang: Console
        source: 'DELETE _synonyms/my-synonyms-set

          '
      - lang: Python
        source: |-
          resp = client.synonyms.delete_synonym(
              id="my-synonyms-set",
          )
      - lang: JavaScript
        source: |-
          const response = await client.synonyms.deleteSynonym({
            id: "my-synonyms-set",
          });
      - lang: Ruby
        source: |-
          response = client.synonyms.delete_synonym(
            id: "my-synonyms-set"
          )
      - lang: PHP
        source: |-
          $resp = $client->synonyms()->deleteSynonym([
              "id" => "my-synonyms-set",
          ]);
      - 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
              .id("my-synonyms-set")
          );
      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.

        ## Required authorization

        * Cluster privileges: `manage_search_synonyms`
      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: |-
                    {
                      "id": "test-1",
                      "synonyms": "hello, hi"
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _synonyms/my-synonyms-set/test-1

          '
      - lang: Python
        source: |-
          resp = client.synonyms.get_synonym_rule(
              set_id="my-synonyms-set",
              rule_id="test-1",
          )
      - lang: JavaScript
        source: |-
          const response = await client.synonyms.getSynonymRule({
            set_id: "my-synonyms-set",
            rule_id: "test-1",
          });
      - lang: Ruby
        source: |-
          response = client.synonyms.get_synonym_rule(
            set_id: "my-synonyms-set",
            rule_id: "test-1"
          )
      - lang: PHP
        source: |-
          $resp = $client->synonyms()->getSynonymRule([
              "set_id" => "my-synonyms-set",
              "rule_id" => "test-1",
          ]);
      - 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
              .ruleId("test-1")
              .setId("my-synonyms-set")
          );
      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.

        If any of the synonym rules included is invalid, the API returns an error.

        When you update a synonym rule, all analyzers using the synonyms set will be reloaded automatically to reflect the new rule.

        ## Required authorization

        * Cluster privileges: `manage_search_synonyms`
      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
      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: |-
                  {
                    "synonyms": "hello, hi, howdy"
                  }
        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`.

                    '
                  value: |-
                    {
                      "result": "updated",
                      "reload_analyzers_details": {
                        "_shards": {
                          "total": 2,
                          "successful": 1,
                          "failed": 0
                        },
                        "reload_details": [
                          {
                            "index": "test-index",
                            "reloaded_analyzers": [
                              "my_search_analyzer"
                            ],
                            "reloaded_node_ids": [
                              "1wYFZzq8Sxeu_Jvt9mlbkg"
                            ]
                          }
                        ]
                      }
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _synonyms/my-synonyms-set/test-1
          {
            "synonyms": "hello, hi, howdy"
          }
      - lang: Python
        source: |-
          resp = client.synonyms.put_synonym_rule(
              set_id="my-synonyms-set",
              rule_id="test-1",
              synonyms="hello, hi, howdy",
          )
      - lang: JavaScript
        source: |-
          const response = await client.synonyms.putSynonymRule({
            set_id: "my-synonyms-set",
            rule_id: "test-1",
            synonyms: "hello, hi, howdy",
          });
      - lang: Ruby
        source: |-
          response = client.synonyms.put_synonym_rule(
            set_id: "my-synonyms-set",
            rule_id: "test-1",
            body: {
              "synonyms": "hello, hi, howdy"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->synonyms()->putSynonymRule([
              "set_id" => "my-synonyms-set",
              "rule_id" => "test-1",
              "body" => [
                  "synonyms" => "hello, hi, howdy",
              ],
          ]);
      - 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
              .ruleId("test-1")
              .setId("my-synonyms-set")
              .synonyms("hello, hi, howdy")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - synonyms
      summary: Delete a synonym rule
      description: |
        Delete a synonym rule from a synonym set.

        ## Required authorization

        * Cluster privileges: `manage_search_synonyms`
      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
      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.

                    '
                  value: |-
                    {
                      "result": "deleted",
                      "reload_analyzers_details": {
                        "_shards": {
                          "total": 2,
                          "successful": 1,
                          "failed": 0
                        },
                        "reload_details": [
                          {
                            "index": "test-index",
                            "reloaded_analyzers": [
                              "my_search_analyzer"
                            ],
                            "reloaded_node_ids": [
                              "1wYFZzq8Sxeu_Jvt9mlbkg"
                            ]
                          }
                        ]
                      }
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _synonyms/my-synonyms-set/test-1

          '
      - lang: Python
        source: |-
          resp = client.synonyms.delete_synonym_rule(
              set_id="my-synonyms-set",
              rule_id="test-1",
          )
      - lang: JavaScript
        source: |-
          const response = await client.synonyms.deleteSynonymRule({
            set_id: "my-synonyms-set",
            rule_id: "test-1",
          });
      - lang: Ruby
        source: |-
          response = client.synonyms.delete_synonym_rule(
            set_id: "my-synonyms-set",
            rule_id: "test-1"
          )
      - lang: PHP
        source: |-
          $resp = $client->synonyms()->deleteSynonymRule([
              "set_id" => "my-synonyms-set",
              "rule_id" => "test-1",
          ]);
      - 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
              .ruleId("test-1")
              .setId("my-synonyms-set")
          );
      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.

        ## Required authorization

        * Cluster privileges: `manage_search_synonyms`
      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: |-
                    {
                      "count": 3,
                      "results": [
                        {
                          "synonyms_set": "ecommerce-synonyms",
                          "count": 2
                        },
                        {
                          "synonyms_set": "my-synonyms-set",
                          "count": 3
                        },
                        {
                          "synonyms_set": "new-ecommerce-synonyms",
                          "count": 1
                        }
                      ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _synonyms

          '
      - 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);

          '
      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.

        WARNING: The task management API is new and should still be considered a beta feature.
        The API may change in ways that are not backwards compatible.

        If the task identifier is not found, a 404 response code indicates that there are no resources that match the request.

        ## Required authorization

        * Cluster privileges: `monitor`
      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.
          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: 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.

                    '
                  value: |-
                    {
                      "nodes" : {
                        "oTUltX4IQMOUUVeiohTt8A" : {
                          "name" : "H5dfFeA",
                          "transport_address" : "127.0.0.1:9300",
                          "host" : "127.0.0.1",
                          "ip" : "127.0.0.1:9300",
                          "tasks" : {
                            "oTUltX4IQMOUUVeiohTt8A:124" : {
                              "node" : "oTUltX4IQMOUUVeiohTt8A",
                              "id" : 124,
                              "type" : "direct",
                              "action" : "cluster:monitor/tasks/lists[n]",
                              "start_time_in_millis" : 1458585884904,
                              "running_time_in_nanos" : 47402,
                              "cancellable" : false,
                              "parent_task_id" : "oTUltX4IQMOUUVeiohTt8A:123"
                            },
                            "oTUltX4IQMOUUVeiohTt8A:123" : {
                              "node" : "oTUltX4IQMOUUVeiohTt8A",
                              "id" : 123,
                              "type" : "transport",
                              "action" : "cluster:monitor/tasks/lists",
                              "start_time_in_millis" : 1458585884904,
                              "running_time_in_nanos" : 236042,
                              "cancellable" : false
                            }
                          }
                        }
                      }
                    }
                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.

                    '
                  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
      x-codeSamples:
      - lang: Console
        source: 'GET _tasks?detailed=true&actions=*/delete/byquery

          '
      - lang: Python
        source: |-
          resp = client.tasks.list(
              detailed=True,
              actions="*/delete/byquery",
          )
      - lang: JavaScript
        source: |-
          const response = await client.tasks.list({
            detailed: "true",
            actions: "*/delete/byquery",
          });
      - lang: Ruby
        source: |-
          response = client.tasks.list(
            detailed: "true",
            actions: "*/delete/byquery"
          )
      - lang: PHP
        source: |-
          $resp = $client->tasks()->list([
              "detailed" => "true",
              "actions" => "*/delete/byquery",
          ]);
      - 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
              .actions("*/delete/byquery")
              .detailed(true)
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_terms_enum":
    post:
      tags:
      - search
      summary: 'Get terms in an index

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_terms_enum</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_terms_enum</span>\n
        \                     </div>\n                    \n\nDiscover 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:
      - "$ref": "#/components/parameters/terms_enum-index"
      requestBody:
        "$ref": "#/components/requestBodies/terms_enum"
      responses:
        '200':
          "$ref": "#/components/responses/terms_enum-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST stackoverflow/_terms_enum
          {
              "field" : "tags",
              "string" : "kiba"
          }
      - lang: Python
        source: |-
          resp = client.terms_enum(
              index="stackoverflow",
              field="tags",
              string="kiba",
          )
      - lang: JavaScript
        source: |-
          const response = await client.termsEnum({
            index: "stackoverflow",
            field: "tags",
            string: "kiba",
          });
      - lang: Ruby
        source: |-
          response = client.terms_enum(
            index: "stackoverflow",
            body: {
              "field": "tags",
              "string": "kiba"
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->termsEnum([
              "index" => "stackoverflow",
              "body" => [
                  "field" => "tags",
                  "string" => "kiba",
              ],
          ]);
      - 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
              .field("tags")
              .index("stackoverflow")
              .string("kiba")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/{index}/_termvectors/{id}":
    post:
      tags:
      - document
      summary: 'Get term vector information

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_termvectors</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_termvectors</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/{index}/_termvectors/{id}</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/{index}/_termvectors/{id}</span>\n
        \                     </div>\n                    \n\nGet 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.\n\n## Required authorization\n\n* Index privileges:
        `read`\n"
      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.18/docs-termvectors.html
      operationId: termvectors
      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"
      requestBody:
        "$ref": "#/components/requestBodies/termvectors"
      responses:
        '200':
          "$ref": "#/components/responses/termvectors-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          GET /my-index-000001/_termvectors/1
          {
            "fields" : ["text"],
            "offsets" : true,
            "payloads" : true,
            "positions" : true,
            "term_statistics" : true,
            "field_statistics" : true
          }
      - lang: Python
        source: |-
          resp = client.termvectors(
              index="my-index-000001",
              id="1",
              fields=[
                  "text"
              ],
              offsets=True,
              payloads=True,
              positions=True,
              term_statistics=True,
              field_statistics=True,
          )
      - lang: JavaScript
        source: |-
          const response = await client.termvectors({
            index: "my-index-000001",
            id: 1,
            fields: ["text"],
            offsets: true,
            payloads: true,
            positions: true,
            term_statistics: true,
            field_statistics: true,
          });
      - lang: Ruby
        source: |-
          response = client.termvectors(
            index: "my-index-000001",
            id: "1",
            body: {
              "fields": [
                "text"
              ],
              "offsets": true,
              "payloads": true,
              "positions": true,
              "term_statistics": true,
              "field_statistics": true
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->termvectors([
              "index" => "my-index-000001",
              "id" => "1",
              "body" => [
                  "fields" => array(
                      "text",
                  ),
                  "offsets" => true,
                  "payloads" => true,
                  "positions" => true,
                  "term_statistics" => true,
                  "field_statistics" => true,
              ],
          ]);
      - 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
              .fieldStatistics(true)
              .fields("text")
              .id("1")
              .index("my-index-000001")
              .offsets(true)
              .payloads(true)
              .positions(true)
              .termStatistics(true)
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_transform/{transform_id}":
    get:
      tags:
      - transform
      summary: 'Get transforms

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_transform</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_transform/{transform_id}</span>\n
        \                     </div>\n                    \n\nGet configuration information
        for transforms.\n\n## Required authorization\n\n* Cluster privileges: `monitor_transform`\n"
      operationId: transform-get-transform
      parameters:
      - "$ref": "#/components/parameters/transform.get_transform-transform_id"
      - "$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"
      responses:
        '200':
          "$ref": "#/components/responses/transform.get_transform-200"
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _transform?size=10

          '
      - lang: Python
        source: |-
          resp = client.transform.get_transform(
              size="10",
          )
      - lang: JavaScript
        source: |-
          const response = await client.transform.getTransform({
            size: 10,
          });
      - lang: Ruby
        source: |-
          response = client.transform.get_transform(
            size: "10"
          )
      - lang: PHP
        source: |-
          $resp = $client->transform()->getTransform([
              "size" => "10",
          ]);
      - 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
              .size(10)
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    put:
      tags:
      - transform
      summary: Create a transform
      description: |
        Creates a transform.

        A 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
        a data frame). The ID for each document in the data frame is generated from a hash of the entity, so there is a
        unique row per entity.

        You must choose either the latest or pivot method for your transform; you cannot use both in a single transform. If
        you choose to use the pivot method for your transform, the entities are defined by the set of `group_by` fields in
        the pivot object. If you choose to use the latest method, the entities are defined by the `unique_key` field values
        in the latest object.

        You must have `create_index`, `index`, and `read` privileges on the destination index and `read` and
        `view_index_metadata` privileges on the source indices. When Elasticsearch security features are enabled, the
        transform remembers which roles the user that created it had at the time of creation and uses those same roles. If
        those roles do not have the required privileges on the source and destination indices, the transform fails when it
        attempts unauthorized operations.

        NOTE: You must use Kibana or this API to create a transform. Do not add a transform directly into any
        `.transform-internal*` indices using the Elasticsearch index API. If Elasticsearch security features are enabled, do
        not give users any privileges on `.transform-internal*` indices. If you used transforms prior to 7.5, also do not
        give users any privileges on `.data-frame-internal*` indices.

        ## Required authorization

        * Index privileges: `create_index`,`read`,`index`,`view_index_metadata`
        * Cluster privileges: `manage_transform`
      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),
          hyphens, 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
          check for the existence of the source indices and a check that the destination index is not part of the source
          index pattern. You can use this parameter to skip the checks, for example when the source index does not exist
          until after the transform is created. The validations are always run when you start the transform, however, with
          the exception of privilege checks.
        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
                    determines the retry interval in the event of transient failures while the transform is searching or indexing.
                    The minimum value is `1s` and the maximum is `1h`.
                  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
                    and 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
                    destination 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: |-
                  {
                    "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"
                      }
                    }
                  }
              PutTransformRequestExample2:
                summary: A latest transform
                description: Run `PUT _transform/ecommerce_transform2` to create a
                  transform that uses the latest method.
                value: |-
                  {
                    "source": {
                      "index": "kibana_sample_data_ecommerce"
                    },
                    "latest": {
                      "unique_key": [
                        "customer_id"
                      ],
                      "sort": "order_date"
                    },
                    "description": "Latest order for each customer",
                    "dest": {
                      "index": "kibana_sample_data_ecommerce_transform2"
                    },
                    "frequency": "5m",
                    "sync": {
                      "time": {
                        "field": "order_date",
                        "delay": "60s"
                      }
                    }
                  }
        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: |-
                    {
                      "acknowledged": true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          PUT _transform/ecommerce_transform1
          {
            "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"
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.transform.put_transform(
              transform_id="ecommerce_transform1",
              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"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.transform.putTransform({
            transform_id: "ecommerce_transform1",
            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",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.transform.put_transform(
            transform_id: "ecommerce_transform1",
            body: {
              "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"
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->transform()->putTransform([
              "transform_id" => "ecommerce_transform1",
              "body" => [
                  "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",
                      ],
                  ],
              ],
          ]);
      - 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
              .description("Maximum priced ecommerce data by customer_id in Asia")
              .dest(d -> d
                  .index("kibana_sample_data_ecommerce_transform1")
                  .pipeline("add_timestamp_pipeline")
              )
              .frequency(f -> f
                  .time("5m")
              )
              .pivot(pi -> pi
                  .aggregations("max_price", a -> a
                      .max(m -> m
                          .field("taxful_total_price")
                      )
                  )
                  .groupBy("customer_id", g -> g
                      .terms(t -> t
                          .field("customer_id")
                          .missingBucket(true)
                      )
                  )
              )
              .retentionPolicy(r -> r
                  .time(t -> t
                      .field("order_date")
                      .maxAge(m -> m
                          .time("30d")
                      )
                  )
              )
              .source(s -> s
                  .index("kibana_sample_data_ecommerce")
                  .query(q -> q
                      .term(te -> te
                          .field("geoip.continent_name")
                          .value(FieldValue.of("Asia"))
                      )
                  )
              )
              .sync(sy -> sy
                  .time(ti -> ti
                      .delay(d -> d
                          .time("60s")
                      )
                      .field("order_date")
                  )
              )
              .transformId("ecommerce_transform1")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
    delete:
      tags:
      - transform
      summary: Delete a transform
      description: |2


        ## Required authorization

        * Cluster privileges: `manage_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
          deleted 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
          index 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: |-
                    {
                      "acknowledged": true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'DELETE _transform/ecommerce_transform

          '
      - lang: Python
        source: |-
          resp = client.transform.delete_transform(
              transform_id="ecommerce_transform",
          )
      - lang: JavaScript
        source: |-
          const response = await client.transform.deleteTransform({
            transform_id: "ecommerce_transform",
          });
      - lang: Ruby
        source: |-
          response = client.transform.delete_transform(
            transform_id: "ecommerce_transform"
          )
      - lang: PHP
        source: |-
          $resp = $client->transform()->deleteTransform([
              "transform_id" => "ecommerce_transform",
          ]);
      - 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
              .transformId("ecommerce_transform")
          );
      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
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_transform/{transform_id}/_stats":
    get:
      tags:
      - transform
      summary: Get transform stats
      description: |
        Get usage information for transforms.

        ## Required authorization

        * Index privileges: `read`,`view_index_metadata`
        * Cluster privileges: `monitor_transform`
      operationId: transform-get-transform-stats
      parameters:
      - in: path
        name: transform_id
        description: |-
          Identifier for the transform. It can be a transform identifier or a
          wildcard expression. You can get information for all transforms by using
          `_all`, by specifying `*` as the `<transform_id>`, or by omitting the
          `<transform_id>`.
        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:

          1. Contains wildcard expressions and there are no transforms that match.
          2. Contains the _all string or no identifiers and there are no matches.
          3. Contains wildcard expressions and there are only partial matches.

          If this parameter is false, the request returns a 404 status code when
          there are no matches or only partial matches.
        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: |-
                    {
                      "count": 1,
                      "transforms": [
                        {
                          "id": "ecommerce-customer-transform",
                          "state": "started",
                          "node": {
                            "id": "cpTIGMsVQ8Gqwqlxxxxxxx",
                            "name": "my.home",
                            "ephemeral_id": "5-L21nFsQxxxxxxxxxx-xx",
                            "transport_address": "127.0.0.1:9300",
                            "attributes": {}
                          },
                          "stats": {
                            "pages_processed": 78,
                            "documents_processed": 6027,
                            "documents_indexed": 68,
                            "documents_deleted": 22,
                            "delete_time_in_ms": 214,
                            "trigger_count": 168,
                            "index_time_in_ms": 412,
                            "index_total": 20,
                            "index_failures": 0,
                            "search_time_in_ms": 353,
                            "search_total": 78,
                            "search_failures": 0,
                            "processing_time_in_ms": 8,
                            "processing_total": 78,
                            "exponential_avg_checkpoint_duration_ms": 97.30637923893185,
                            "exponential_avg_documents_indexed": 2.2064915040974062,
                            "exponential_avg_documents_processed": 179.89419945785045
                          },
                          "checkpointing": {
                            "last": {
                              "checkpoint": 20,
                              "timestamp_millis": 1585344558220,
                              "time_upper_bound_millis": 1585344498220
                            },
                            "changes_last_detected_at": 1585344558219
                          },
                          "health": {
                            "status": "green"
                          }
                        }
                      ]
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'GET _transform/ecommerce-customer-transform/_stats

          '
      - lang: Python
        source: |-
          resp = client.transform.get_transform_stats(
              transform_id="ecommerce-customer-transform",
          )
      - lang: JavaScript
        source: |-
          const response = await client.transform.getTransformStats({
            transform_id: "ecommerce-customer-transform",
          });
      - lang: Ruby
        source: |-
          response = client.transform.get_transform_stats(
            transform_id: "ecommerce-customer-transform"
          )
      - lang: PHP
        source: |-
          $resp = $client->transform()->getTransformStats([
              "transform_id" => "ecommerce-customer-transform",
          ]);
      - 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
              .transformId("ecommerce-customer-transform")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_transform/{transform_id}/_preview":
    post:
      tags:
      - transform
      summary: 'Preview a transform

        '
      description: "**All methods and paths for this operation:**\n\n<div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_transform/_preview</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_transform/_preview</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb get\">GET</span>\n                      <span class=\"operation-path\">/_transform/{transform_id}/_preview</span>\n
        \                     </div>\n                    <div>\n                      <span
        class=\"operation-verb post\">POST</span>\n                      <span class=\"operation-path\">/_transform/{transform_id}/_preview</span>\n
        \                     </div>\n                    \n\nGenerates 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.\n\n##
        Required authorization\n\n* Index privileges: `read`,`view_index_metadata`\n*
        Cluster privileges: `manage_transform`\n"
      operationId: transform-preview-transform
      parameters:
      - "$ref": "#/components/parameters/transform.preview_transform-transform_id"
      - "$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: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _transform/_preview
          {
            "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"
                  }
                }
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.transform.preview_transform(
              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"
                          }
                      }
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.transform.previewTransform({
            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",
                  },
                },
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.transform.preview_transform(
            body: {
              "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"
                    }
                  }
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->transform()->previewTransform([
              "body" => [
                  "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",
                              ],
                          ],
                      ],
                  ],
              ],
          ]);
      - 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
              .pivot(pi -> pi
                  .aggregations("max_price", a -> a
                      .max(m -> m
                          .field("taxful_total_price")
                      )
                  )
                  .groupBy("customer_id", g -> g
                      .terms(t -> t
                          .field("customer_id")
                          .missingBucket(true)
                      )
                  )
              )
              .source(s -> s
                  .index("kibana_sample_data_ecommerce")
              )
          );
      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.
        If the destination index was created by the transform, it is deleted.

        ## Required authorization

        * Cluster privileges: `manage_transform`
      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),
          hyphens, 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
          must 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: |-
                    {
                      "acknowledged": true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'POST _transform/ecommerce_transform/_reset

          '
      - lang: Python
        source: |-
          resp = client.transform.reset_transform(
              transform_id="ecommerce_transform",
          )
      - lang: JavaScript
        source: |-
          const response = await client.transform.resetTransform({
            transform_id: "ecommerce_transform",
          });
      - lang: Ruby
        source: |-
          response = client.transform.reset_transform(
            transform_id: "ecommerce_transform"
          )
      - lang: PHP
        source: |-
          $resp = $client->transform()->resetTransform([
              "transform_id" => "ecommerce_transform",
          ]);
      - 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
              .transformId("ecommerce_transform")
          );
      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.
        If you run this API, the transform will process the new data instantly,
        without waiting for the configured frequency interval. After the API is called,
        the transform will be processed again at `now + frequency` unless the API
        is called again in the meantime.

        ## Required authorization

        * Cluster privileges: `manage_transform`
      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: |-
                    {
                      "acknowledged": true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'POST _transform/ecommerce_transform/_schedule_now

          '
      - lang: Python
        source: |-
          resp = client.transform.schedule_now_transform(
              transform_id="ecommerce_transform",
          )
      - lang: JavaScript
        source: |-
          const response = await client.transform.scheduleNowTransform({
            transform_id: "ecommerce_transform",
          });
      - lang: Ruby
        source: |-
          response = client.transform.schedule_now_transform(
            transform_id: "ecommerce_transform"
          )
      - lang: PHP
        source: |-
          $resp = $client->transform()->scheduleNowTransform([
              "transform_id" => "ecommerce_transform",
          ]);
      - 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
              .transformId("ecommerce_transform")
          );
      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
        set to `1` and the `auto_expand_replicas` is set to `0-1`. If it is a pivot transform, it deduces the mapping
        definitions for the destination index from the source indices and the transform aggregations. If fields in the
        destination index are derived from scripts (as in the case of `scripted_metric` or `bucket_script` aggregations),
        the transform uses dynamic mappings unless an index template exists. If it is a latest transform, it does not deduce
        mapping definitions; it uses dynamic mappings. To use explicit mappings, create the destination index before you
        start the transform. Alternatively, you can create an index template, though it does not affect the deduced mappings
        in a pivot transform.

        When the transform starts, a series of validations occur to ensure its success. If you deferred validation when you
        created the transform, they occur when you start the transform—​with the exception of privilege checks. When
        Elasticsearch security features are enabled, the transform remembers which roles the user that created it had at the
        time of creation and uses those same roles. If those roles do not have the required privileges on the source and
        destination indices, the transform fails when it attempts unauthorized operations.

        ## Required authorization

        * Index privileges: `read`,`view_index_metadata`
        * Cluster privileges: `manage_transform`
      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: |-
                    {
                      "acknowledged": true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'POST _transform/ecommerce-customer-transform/_start

          '
      - lang: Python
        source: |-
          resp = client.transform.start_transform(
              transform_id="ecommerce-customer-transform",
          )
      - lang: JavaScript
        source: |-
          const response = await client.transform.startTransform({
            transform_id: "ecommerce-customer-transform",
          });
      - lang: Ruby
        source: |-
          response = client.transform.start_transform(
            transform_id: "ecommerce-customer-transform"
          )
      - lang: PHP
        source: |-
          $resp = $client->transform()->startTransform([
              "transform_id" => "ecommerce-customer-transform",
          ]);
      - 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
              .transformId("ecommerce-customer-transform")
          );
      x-metaTags:
      - content: Elasticsearch
        name: product_name
  "/_transform/{transform_id}/_stop":
    post:
      tags:
      - transform
      summary: Stop transforms
      description: |
        Stops one or more transforms.

        ## Required authorization

        * Cluster privileges: `manage_transform`
      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.
          To 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;
          contains the `_all` string or no identifiers and there are no matches; contains wildcard expressions and there
          are only partial matches.

          If it is true, the API returns a successful acknowledgement message when there are no matches. When there are
          only partial matches, the API stops the appropriate transforms.

          If it is false, the request returns a 404 status code when there are no matches or only partial matches.
        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
          timeout expires, the request returns a timeout exception. However, the request continues processing and
          eventually 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,
          the 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
          immediately 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: |-
                    {
                      "acknowledged": true
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: 'POST _transform/ecommerce_transform/_stop

          '
      - lang: Python
        source: |-
          resp = client.transform.stop_transform(
              transform_id="ecommerce_transform",
          )
      - lang: JavaScript
        source: |-
          const response = await client.transform.stopTransform({
            transform_id: "ecommerce_transform",
          });
      - lang: Ruby
        source: |-
          response = client.transform.stop_transform(
            transform_id: "ecommerce_transform"
          )
      - lang: PHP
        source: |-
          $resp = $client->transform()->stopTransform([
              "transform_id" => "ecommerce_transform",
          ]);
      - 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
              .transformId("ecommerce_transform")
          );
      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.

        All updated properties except `description` do not take effect until after the transform starts the next checkpoint,
        thus there is data consistency in each checkpoint. To use this API, you must have `read` and `view_index_metadata`
        privileges for the source indices. You must also have `index` and `read` privileges for the destination index. When
        Elasticsearch security features are enabled, the transform remembers which roles the user who updated it had at the
        time of update and runs with those privileges.

        ## Required authorization

        * Index privileges: `read`,`index`,`view_index_metadata`
        * Cluster privileges: `manage_transform`
      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
          desired if the source index does not exist until after the transform is
          created.
        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 determines the retry interval in
                    the event of transient failures while the transform is searching or
                    indexing. The minimum value is 1s and the maximum is 1h.
                  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
                    criteria 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: |-
                  {
                    "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"
                      }
                    }
                  }
        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: |-
                    {
                      "id": "simple-kibana-ecomm-pivot",
                      "authorization": {
                        "roles": [
                          "superuser"
                        ]
                      },
                      "version": "10.0.0",
                      "create_time": 1712951576767,
                      "source": {
                        "index": [
                          "kibana_sample_data_ecommerce"
                        ],
                        "query": {
                          "term": {
                            "geoip.continent_name": {
                              "value": "Asia"
                            }
                          }
                        }
                      },
                      "dest": {
                        "index": "kibana_sample_data_ecommerce_transform_v2",
                        "pipeline": "add_timestamp_pipeline"
                      },
                      "frequency": "15m",
                      "sync": {
                        "time": {
                          "field": "order_date",
                          "delay": "120s"
                        }
                      },
                      "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",
                      "settings": {},
                      "retention_policy": {
                        "time": {
                          "field": "order_date",
                          "max_age": "30d"
                        }
                      }
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST _transform/simple-kibana-ecomm-pivot/_update
          {
            "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"
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.transform.update_transform(
              transform_id="simple-kibana-ecomm-pivot",
              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"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.transform.updateTransform({
            transform_id: "simple-kibana-ecomm-pivot",
            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",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.transform.update_transform(
            transform_id: "simple-kibana-ecomm-pivot",
            body: {
              "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"
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->transform()->updateTransform([
              "transform_id" => "simple-kibana-ecomm-pivot",
              "body" => [
                  "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",
                      ],
                  ],
              ],
          ]);
      - 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
              .description("Maximum priced ecommerce data by customer_id in Asia")
              .dest(d -> d
                  .index("kibana_sample_data_ecommerce_transform_v2")
                  .pipeline("add_timestamp_pipeline")
              )
              .frequency(f -> f
                  .time("15m")
              )
              .source(s -> s
                  .index("kibana_sample_data_ecommerce")
                  .query(q -> q
                      .term(t -> t
                          .field("geoip.continent_name")
                          .value(FieldValue.of("Asia"))
                      )
                  )
              )
              .sync(sy -> sy
                  .time(t -> t
                      .delay(d -> d
                          .time("120s")
                      )
                      .field("order_date")
                  )
              )
              .transformId("simple-kibana-ecomm-pivot")
          );
      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.

        If the Elasticsearch security features are enabled, you must have the `index` or `write` index privilege for the target index or index alias.

        The script can update, delete, or skip modifying the document.
        The API also supports passing a partial document, which is merged into the existing document.
        To fully replace an existing document, use the index API.
        This operation:

        * Gets the document (collocated with the shard) from the index.
        * Runs the specified script.
        * Indexes the result.

        The 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.

        The `_source` field must be enabled to use this API.
        In addition to `_source`, you can access the following variables through the `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the current timestamp).
        For usage examples such as partial updates, upserts, and scripted updates, see the External documentation.

        ## Required authorization

        * Index privileges: `write`
      externalDocs:
        url: https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-document
        x-previousVersionUrl: https://www.elastic.co/guide/en/elasticsearch/reference/8.18/docs-update.html
      operationId: update
      parameters:
      - in: path
        name: index
        description: |-
          The name of the target index.
          By 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.
          If 'wait_for', it waits for a refresh to make this operation visible to search.
          If '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.
          Elasticsearch waits for at least the timeout period before failing.
          The 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.
          Set to 'all' or any positive integer up to the total number of shards in the index (`number_of_replicas`+1).
          The 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.
          You 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.
                    If 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'.
                    NOTE: 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.
                    You 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.
                    If 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: |-
                  {
                    "script" : {
                      "source": "ctx._source.counter += params.count",
                      "lang": "painless",
                      "params" : {
                        "count" : 4
                      }
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "scripted_upsert": true,
                    "script": {
                      "source": """
                        if ( ctx.op == 'create' ) {
                          ctx._source.counter = params.count
                        } else {
                          ctx._source.counter += params.count
                        }
                      """,
                      "params": {
                        "count": 4
                      }
                    },
                    "upsert": {}
                  }
              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.

                  '
                value: |-
                  {
                    "doc": {
                      "name": "new_name"
                    },
                    "doc_as_upsert": true
                  }
              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.

                  '
                value: |-
                  {
                    "script": {
                      "source": "ctx._source.tags.add(params.tag)",
                      "lang": "painless",
                      "params": {
                        "tag": "blue"
                      }
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "script": {
                      "source": "if (ctx._source.tags.contains(params.tag)) { ctx._source.tags.remove(ctx._source.tags.indexOf(params.tag)) }",
                      "lang": "painless",
                      "params": {
                        "tag": "blue"
                      }
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "script" : "ctx._source.new_field = 'value_of_new_field'"
                  }
              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.

                  '
                value: |-
                  {
                    "script" : "ctx._source.remove('new_field')"
                  }
              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.

                  '
                value: |-
                  {
                    "script": "ctx._source['my-object'].remove('my-subfield')"
                  }
              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`).

                  '
                value: |-
                  {
                    "script": {
                      "source": "if (ctx._source.tags.contains(params.tag)) { ctx.op = 'delete' } else { ctx.op = 'noop' }",
                      "lang": "painless",
                      "params": {
                        "tag": "green"
                      }
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "doc": {
                      "name": "new_name"
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "script": {
                      "source": "ctx._source.counter += params.count",
                      "lang": "painless",
                      "params": {
                        "count": 4
                      }
                    },
                    "upsert": {
                      "counter": 1
                    }
                  }
        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"`.

                    '
                  value: |-
                    {
                       "_shards": {
                            "total": 0,
                            "successful": 0,
                            "failed": 0
                       },
                       "_index": "test",
                       "_id": "1",
                       "_version": 2,
                       "_primary_term": 1,
                       "_seq_no": 1,
                       "result": "noop"
                    }
      x-state: Generally available
      x-codeSamples:
      - lang: Console
        source: |-
          POST test/_update/1
          {
            "script" : {
              "source": "ctx._source.counter += params.count",
              "lang": "painless",
              "params" : {
                "count" : 4
              }
            }
          }
      - lang: Python
        source: |-
          resp = client.update(
              index="test",
              id="1",
              script={
                  "source": "ctx._source.counter += params.count",
                  "lang": "painless",
                  "params": {
                      "count": 4
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.update({
            index: "test",
            id: 1,
            script: {
              source: "ctx._source.counter += params.count",
              lang: "painless",
              params: {
                count: 4,
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.update(
            index: "test",
            id: "1",
            body: {
              "script": {
                "source": "ctx._source.counter += params.count",
                "lang": "painless",
                "params": {
                  "count": 4
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->update([
              "index" => "test",
              "id" => "1",
              "body" => [
                  "script" => [
                      "source" => "ctx._source.counter += params.count",
                      "lang" => "painless",
                      "params" => [
                          "count" => 4,
                      ],
                  ],
              ],
          ]);
      - 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
              .id("1")
              .index("test")
              .script(s -> s
                  .source(so -> so
                      .scriptString("ctx._source.counter += params.count")
                  )
                  .params("count", JsonData.fromJson("4"))
                  .lang("painless")
              )
          ,Void.class);
      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.
        If 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.

        If the Elasticsearch security features are enabled, you must have the following index privileges for the target data stream, index, or alias:

        * `read`
        * `index` or `write`

        You can specify the query criteria in the request URI or the request body using the same syntax as the search API.

        When 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.
        When the versions match, the document is updated and the version number is incremented.
        If 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.
        You can opt to count version conflicts instead of halting and returning by setting `conflicts` to `proceed`.
        Note 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.

        NOTE: 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.

        While processing an update by query request, Elasticsearch performs multiple search requests sequentially to find all of the matching documents.
        A bulk update request is performed for each batch of matching documents.
        Any query or update failures cause the update by query request to fail and the failures are shown in the response.
        Any update requests that completed successfully still stick, they are not rolled back.

        **Refreshing shards**

        Specifying the `refresh` parameter refreshes all shards once the request completes.
        This is different to the update API's `refresh` parameter, which causes only the shard
        that received the request to be refreshed. Unlike the update API, it does not support
        `wait_for`.

        **Running update by query asynchronously**

        If the request contains `wait_for_completion=false`, Elasticsearch
        performs some preflight checks, launches the request, and returns a
        [task](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks) 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}`.

        **Waiting for active shards**

        `wait_for_active_shards` controls how many copies of a shard must be active
        before 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)
        for details. `timeout` controls how long each write request waits for unavailable
        shards to become available. Both work exactly the way they work in the
        [Bulk API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk). Update by query uses scrolled searches, so you can also
        specify the `scroll` parameter to control how long it keeps the search context
        alive, for example `?scroll=10m`. The default is 5 minutes.

        **Throttling update requests**

        To control the rate at which update by query issues batches of update operations, you can set `requests_per_second` to any positive decimal number.
        This pads each batch with a wait time to throttle the rate.
        Set `requests_per_second` to `-1` to turn off throttling.

        Throttling uses a wait time between batches so that the internal scroll requests can be given a timeout that takes the request padding into account.
        The padding time is the difference between the batch size divided by the `requests_per_second` and the time spent writing.
        By default the batch size is 1000, so if `requests_per_second` is set to `500`:

        ```
        target_time = 1000 / 500 per second = 2 seconds
        wait_time = target_time - write_time = 2 seconds - .5 seconds = 1.5 seconds
        ```

        Since 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.
        This is "bursty" instead of "smooth".

        **Slicing**

        Update by query supports sliced scroll to parallelize the update process.
        This can improve efficiency and provide a convenient way to break the request down into smaller parts.

        Setting `slices` to `auto` chooses a reasonable number for most data streams and indices.
        This setting will use one slice per shard, up to a certain limit.
        If 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.

        Adding `slices` to `_update_by_query` just automates the manual process of creating sub-requests, which means it has some quirks:

        * You can see these requests in the tasks APIs. These sub-requests are "child" tasks of the task for the request with slices.
        * Fetching the status of the task for the request with `slices` only contains the status of completed slices.
        * These sub-requests are individually addressable for things like cancellation and rethrottling.
        * Rethrottling the request with `slices` will rethrottle the unfinished sub-request proportionally.
        * Canceling the request with slices will cancel each sub-request.
        * 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.
        * 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.
        * 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.

        If you're slicing manually or otherwise tuning automatic slicing, keep in mind that:

        * 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.
        * Update performance scales linearly across available resources with the number of slices.

        Whether query or update performance dominates the runtime depends on the documents being reindexed and cluster resources.
        Refer to the linked documentation for examples of how to update documents using the `_update_by_query` API:

        ## Required authorization

        * Index privileges: `read`,`write`
      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.18/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.
          It supports wildcards (`*`).
          To 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.
          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
      - in: query
        name: analyzer
        description: |-
          The analyzer to use for the query string.
          This 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.
          This 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`.

          Supported values include:
            - `abort`: Stop reindexing if there are conflicts.
            - `proceed`: Continue reindexing even if there are conflicts.

        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`.
          This 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.
          This 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.
          If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
          It supports comma-separated values, such as `open,hidden`.

          Supported values include:
            - `all`: Match any data stream or index, including hidden ones.
            - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
            - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
            - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
            - `none`: Wildcard expressions are not accepted.

        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.
          This 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.
          It defaults to all documents.
          When 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.
          If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.
          If a final pipeline is configured it will always run, regardless of the value of this parameter.
        deprecated: false
        schema:
          type: string
        style: form
      - in: query
        name: preference
        description: |-
          The node or shard the operation should be performed on.
          It 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.
          This 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.
          It 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.
          By 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`.

          Supported values include:
            - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.
            - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.

        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 <field>:<direction> 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.
          If a query reaches this limit, Elasticsearch terminates the query early.
          Elasticsearch collects documents before sorting.

          IMPORTANT: Use with caution.
          Elasticsearch applies this parameter to each shard handling the request.
          When possible, let Elasticsearch perform early termination automatically.
          Avoid 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.
          By default, it is one minute.
          This guarantees Elasticsearch waits for at least the timeout before failing.
          The 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.
          Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
          The `timeout` parameter controls how long each write request waits for unavailable shards to become available.
          Both 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.
          If `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.
          Elasticsearch 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`.

                    Supported values include:
                      - `abort`: Stop reindexing if there are conflicts.
                      - `proceed`: Continue reindexing even if there are conflicts.

                  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.

                  '
                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`.

                  '
                value: |-
                  {
                    "script": {
                      "source": "ctx._source.count++",
                      "lang": "painless"
                    },
                    "query": {
                      "term": {
                        "user.id": "kimchy"
                      }
                    }
                  }
              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.

                  '
                value: |-
                  {
                    "slice": {
                      "id": 0,
                      "max": 2
                    },
                    "script": {
                      "source": "ctx._source['extra'] = 'test'"
                    }
                  }
              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`.

                  '
                value: |-
                  {
                    "script": {
                      "source": "ctx._source['extra'] = 'test'"
                    }
                  }
      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.
                      If this is non-empty then the request ended because of those failures.
                      Update by query is implemented using batches.
                      Any failure causes the entire process to end, but all failures in the current batch are collected into the array.
                      You 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.
                      `bulk` is the number of bulk actions retried.
                      `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.
                      It 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
      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(
              index="my-index-000001",
              conflicts="proceed",
              query={
                  "term": {
                      "user.id": "kimchy"
                  }
              },
          )
      - lang: JavaScript
        source: |-
          const response = await client.updateByQuery({
            index: "my-index-000001",
            conflicts: "proceed",
            query: {
              term: {
                "user.id": "kimchy",
              },
            },
          });
      - lang: Ruby
        source: |-
          response = client.update_by_query(
            index: "my-index-000001",
            conflicts: "proceed",
            body: {
              "query": {
                "term": {
                  "user.id": "kimchy"
                }
              }
            }
          )
      - lang: PHP
        source: |-
          $resp = $client->updateByQuery([
              "index" => "my-index-000001",
              "conflicts" => "proceed",
              "body" => [
                  "query" => [
                      "term" => [
                          "user.id" => "kimchy",
                      ],
                  ],
              ],
          ]);
      - 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
              .conflicts(Conflicts.Proceed)
              .index("my-index-000001")
              .query(q -> q
                  .term(t -> t
                      .field("user.id")
                      .value(FieldValue.of("kimchy"))
                  )
              )
          );
      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
        `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
      type: string
    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.
            If 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.
            Note 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"
      x-model: true
    _types.aggregations.CardinalityAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.AggregateBase"
      - type: object
        properties:
          value:
            type: number
        required:
        - value
      x-model: true
    _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
      x-model: true
    _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
      x-model: true
    _types.aggregations.TDigestPercentilesAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.PercentilesAggregateBase"
      - type: object
      x-model: true
    _types.aggregations.TDigestPercentileRanksAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.PercentilesAggregateBase"
      - type: object
      x-model: true
    _types.aggregations.PercentilesBucketAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.PercentilesAggregateBase"
      - type: object
      x-model: true
    _types.aggregations.MedianAbsoluteDeviationAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase"
      - type: object
      x-model: true
    _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,
              unless 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
      x-model: true
    _types.aggregations.MaxAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase"
      - type: object
      x-model: true
    _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
      x-model: true
    _types.aggregations.AvgAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase"
      - type: object
      x-model: true
    _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
      x-model: true
    _types.aggregations.ValueCountAggregate:
      description: Value count aggregation result. `value` is always present.
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase"
      - type: object
      x-model: true
    _types.aggregations.SimpleValueAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase"
      - type: object
      x-model: true
    _types.aggregations.DerivativeAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase"
      - type: object
        properties:
          normalized_value:
            type: number
          normalized_value_as_string:
            type: string
      x-model: true
    _types.aggregations.BucketMetricValueAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.SingleMetricAggregateBase"
      - type: object
        properties:
          keys:
            type: array
            items:
              type: string
        required:
        - keys
      x-model: true
    _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
        (`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
      x-model: true
    _types.aggregations.StatsBucketAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.StatsAggregate"
      - type: object
      x-model: true
    _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
      x-model: true
    _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
      x-model: true
    _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:
        - as a `{lat, long}` object
        - as a geo hash value
        - as a `[lon, lat]` array
        - as a string in `"<lat>, <lon>"` 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"
      x-model: true
    _types.GeoBounds:
      description: |-
        A geo bounding box. It can be represented in various ways:
        - as 4 top/bottom/left/right coordinates
        - as 2 top_left / bottom_right points
        - as 2 top_right / bottom_left points
        - 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
      x-model: true
    _types.aggregations.HistogramAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseHistogramBucket"
      - type: object
      x-model: true
    _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
        the 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
      x-model: true
    _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
        the 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
      x-model: true
    _types.DurationLarge:
      description: |-
        A date histogram interval. Similar to `Duration` with additional units: `w` (week), `M` (month), `q` (quarter) and
        `y` (year)
      type: string
    _types.aggregations.VariableWidthHistogramAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseVariableWidthHistogramBucket"
      - type: object
      x-model: true
    _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
        the 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
      x-model: true
    _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
        the 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
      x-model: true
    _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
        the 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
      x-model: true
    _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
        the 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
      x-model: true
    _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
        the 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.

        Although "void" is generally used for the unit type that has only one value, this is to be interpreted as
        the bottom type that has no value at all. Most languages have a unit type, but few have a bottom type.

        See 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
      x-model: true
    _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
        the 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
      x-model: true
    _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
        the 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
      x-model: true
    _types.aggregations.MultiTermsAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.TermsAggregateBaseMultiTermsBucket"
      - type: object
      x-model: true
    _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
        the 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
      x-model: true
    _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
      x-model: true
    _types.aggregations.ReverseNestedAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase"
      - type: object
      x-model: true
    _types.aggregations.GlobalAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase"
      - type: object
      x-model: true
    _types.aggregations.FilterAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase"
      - type: object
      x-model: true
    _types.aggregations.ChildrenAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase"
      - type: object
      x-model: true
    _types.aggregations.ParentAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase"
      - type: object
      x-model: true
    _types.aggregations.SamplerAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase"
      - type: object
      x-model: true
    _types.aggregations.UnmappedSamplerAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.SingleBucketAggregateBase"
      - type: object
      x-model: true
    _types.aggregations.GeoHashGridAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseGeoHashGridBucket"
      - type: object
      x-model: true
    _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
        the 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
      x-model: true
    _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
        the 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
      x-model: true
    _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
        the 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
      x-model: true
    _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
        the 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`
        in `buckets` are milliseconds since the Epoch, represented as a floating point number.
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.RangeAggregate"
      - type: object
      x-model: true
    _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
      x-model: true
    _types.aggregations.IpRangeAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.MultiBucketAggregateBaseIpRangeBucket"
      - type: object
      x-model: true
    _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
        the 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
      x-model: true
    _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
        the 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
      x-model: true
    _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
        the 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
      x-model: true
    _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
        the 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
      x-model: true
    _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
        the 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
      x-model: true
    _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
        the 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
      x-model: true
    _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"
      x-model: true
    _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
        the 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
      x-model: true
    _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
        the 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
      x-model: true
    _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
        the 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
      x-model: true
    _types.aggregations.TopHitsAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.AggregateBase"
      - type: object
        properties:
          hits:
            allOf:
            - "$ref": "#/components/schemas/_global.search._types.HitsMetadata"
        required:
        - hits
      x-model: true
    _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:
          description: |2+


            Supported values include:
              - `eq`: Accurate
              - `gte`: Lower bound, including returned events or sequences

          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
      x-model: true
    _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
      x-model: true
    _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
      x-model: true
    _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
      x-model: true
    _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
      x-model: true
    _types.aggregations.RateAggregate:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.AggregateBase"
      - type: object
        properties:
          value:
            type: number
          value_as_string:
            type: string
        required:
        - value
      x-model: true
    _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
      x-model: true
    _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
      x-model: true
    _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
      x-model: true
    _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.
        Additional 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.
            While 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.

            > info
            > 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.
            It 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
        number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string
        representation.
      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.
              It 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.
              For example, `200` indicates that the async search was successfully completed.
              `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
        number of hits is returned at the cost of some performance. If false, the
        response does not include the total number of hits matching the query.
        Defaults 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.
        Used 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.
              Only 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.
              The request provides a collection of named filter expressions, similar to the `filters` aggregation.
              Each 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.
              The 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.
              Given a distribution of values provided by the sibling multi-bucket aggregation,
              this aggregation indicates the bucket of any spike or dip and/or the bucket at which
              the largest change in the distribution of values, if they are statistically significant.
              There 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.
              Unlike 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.
              It 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.
              Similar 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.
              Evaluates 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.
              Each 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.
              Each 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.
              Each 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.
              This 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.
              It 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.
              For 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.
              Can 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.
              Should only be defined inside a `nested` aggregation.
            allOf:
            - "$ref": "#/components/schemas/_types.aggregations.ReverseNestedAggregation"
          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.
              This 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.
              At 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
          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.
            If 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.
            For 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.
            This 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
            metric. knn query finds nearest vectors through approximate search on indexed
            dense_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.
            The 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.
            Each term except the last is used in a `term` query.
            The 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.
            The 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.
            The 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.
            If 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.
            The 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
          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.
            You 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
          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.
            To 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.
            To 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.
            To 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
          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
          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
      x-model: true
    _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.
              However, 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.
              Because 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"
      x-model: true
    _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.
            Boost values are relative to the default value of 1.0.
            A boost value between 0 and 1.0 decreases the relevance score.
            A value greater than 1.0 increases the relevance score.
          default: 1
          type: number
        _name:
          type: string
      x-model: true
    _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
      x-model: true
    _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
      x-model: true
    _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`.
              The `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.

              Supported values include:
                - `none`: No documents are returned if the analyzer removes all tokens.
                - `all`: Returns all documents, similar to a `match_all` query.

            default: none
            allOf:
            - "$ref": "#/components/schemas/_types.query_dsl.CombinedFieldsZeroTerms"
        required:
        - fields
        - query
      x-model: true
    _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.
              Filter queries do not calculate relevance scores.
              To speed up performance, Elasticsearch automatically caches frequently used filter queries.
            allOf:
            - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer"
        required:
        - filter
      x-model: true
    _types.query_dsl.DisMaxQuery:
      allOf:
      - "$ref": "#/components/schemas/_types.query_dsl.QueryBase"
      - type: object
        properties:
          queries:
            description: |-
              One or more query clauses.
              Returned documents must match one or more of these queries.
              If 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
            type: number
        required:
        - queries
      x-model: true
    _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"
      x-model: true
    _types.query_dsl.UntypedDistanceFeatureQuery:
      allOf:
      - "$ref": "#/components/schemas/_types.query_dsl.DistanceFeatureQueryBase"
      - type: object
      x-model: true
    _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.
              If the `field` value is a `date` or `date_nanos` field, the `origin` value must be a date.
              Date Math, such as `now-1h`, is supported.
              If 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.
              If 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:
              be a `date`, `date_nanos` or `geo_point` field;
              have an `index` mapping parameter value of `true`, which is the default;
              have an `doc_values` mapping parameter value of `true`, which is the default.
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
        required:
        - origin
        - pivot
        - field
      x-model: true
    _types.query_dsl.GeoDistanceFeatureQuery:
      allOf:
      - "$ref": "#/components/schemas/_types.query_dsl.DistanceFeatureQueryBaseGeoLocationDistance"
      - type: object
      x-model: true
    _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.
              If the `field` value is a `date` or `date_nanos` field, the `origin` value must be a date.
              Date Math, such as `now-1h`, is supported.
              If 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.
              If 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:
              be a `date`, `date_nanos` or `geo_point` field;
              have an `index` mapping parameter value of `true`, which is the default;
              have an `doc_values` mapping parameter value of `true`, which is the default.
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
        required:
        - origin
        - pivot
        - field
      x-model: true
    _types.Distance:
      type: string
    _types.query_dsl.DateDistanceFeatureQuery:
      allOf:
      - "$ref": "#/components/schemas/_types.query_dsl.DistanceFeatureQueryBaseDateMathDuration"
      - type: object
      x-model: true
    _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.
              If the `field` value is a `date` or `date_nanos` field, the `origin` value must be a date.
              Date Math, such as `now-1h`, is supported.
              If 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.
              If 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:
              be a `date`, `date_nanos` or `geo_point` field;
              have an `index` mapping parameter value of `true`, which is the default;
              have an `doc_values` mapping parameter value of `true`, which is the default.
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
        required:
        - origin
        - pivot
        - field
      x-model: true
    _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
      x-model: true
    _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

              Supported values include:
                - `multiply`: Query score and function score are multiplied
                - `replace`: Only the function score is used.
              The query score is ignored.
                - `sum`: Query score and function score are added
                - `avg`: Query score and function score are averaged
                - `max`: Max of query score and function score
                - `min`: Min of query score and function score

            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

              Supported values include:
                - `multiply`: Scores are multiplied.
                - `sum`: Scores are summed.
                - `avg`: Scores are averaged.
                - `first`: The first function that has a matching filter is applied.
                - `max`: Maximum score is used.
                - `min`: Minimum score is used.

            default: multiply
            allOf:
            - "$ref": "#/components/schemas/_types.query_dsl.FunctionScoreMode"
      x-model: true
    _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.
              It’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.
              In 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
      x-model: true
    _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"
      x-model: true
    _types.query_dsl.UntypedDecayFunction:
      allOf:
      - "$ref": "#/components/schemas/_types.query_dsl.DecayFunctionBase"
      - type: object
      x-model: true
    _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.

            Supported values include:
              - `min`: Distance is the minimum distance.
              - `max`: Distance is the maximum distance.
              - `avg`: Distance is the average distance.
              - `sum`: Distance is the sum of all distances.

          default: min
          allOf:
          - "$ref": "#/components/schemas/_types.query_dsl.MultiValueMode"
      x-model: true
    _types.query_dsl.MultiValueMode:
      type: string
      enum:
      - min
      - max
      - avg
      - sum
      x-model: true
    _types.query_dsl.DateDecayFunction:
      allOf:
      - "$ref": "#/components/schemas/_types.query_dsl.DecayFunctionBaseDateMathDuration"
      - type: object
      x-model: true
    _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.

            Supported values include:
              - `min`: Distance is the minimum distance.
              - `max`: Distance is the maximum distance.
              - `avg`: Distance is the average distance.
              - `sum`: Distance is the sum of all distances.

          default: min
          allOf:
          - "$ref": "#/components/schemas/_types.query_dsl.MultiValueMode"
      x-model: true
    _types.query_dsl.NumericDecayFunction:
      allOf:
      - "$ref": "#/components/schemas/_types.query_dsl.DecayFunctionBasedoubledouble"
      - type: object
      x-model: true
    _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.

            Supported values include:
              - `min`: Distance is the minimum distance.
              - `max`: Distance is the maximum distance.
              - `avg`: Distance is the average distance.
              - `sum`: Distance is the sum of all distances.

          default: min
          allOf:
          - "$ref": "#/components/schemas/_types.query_dsl.MultiValueMode"
      x-model: true
    _types.query_dsl.GeoDecayFunction:
      allOf:
      - "$ref": "#/components/schemas/_types.query_dsl.DecayFunctionBaseGeoLocationDistance"
      - type: object
      x-model: true
    _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.

            Supported values include:
              - `min`: Distance is the minimum distance.
              - `max`: Distance is the maximum distance.
              - `avg`: Distance is the average distance.
              - `sum`: Distance is the sum of all distances.

          default: min
          allOf:
          - "$ref": "#/components/schemas/_types.query_dsl.MultiValueMode"
      x-model: true
    _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
          type: number
        missing:
          description: |-
            Value used if the document doesn’t have that field.
            The 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.

            Supported values include:
              - `none`: Do not apply any multiplier to the field value.
              - `log`: Take the common logarithm of the field value.
            Because 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.
              - `log1p`: Add 1 to the field value and take the common logarithm.
              - `log2p`: Add 2 to the field value and take the common logarithm.
              - `ln`: Take the natural logarithm of the field value.
            Because 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.
              - `ln1p`: Add 1 to the field value and take the natural logarithm.
              - `ln2p`: Add 2 to the field value and take the natural logarithm.
              - `square`: Square the field value (multiply it by itself).
              - `sqrt`: Take the square root of the field value.
              - `reciprocal`: Reciprocate the field value, same as `1/x` where `x` is the field’s value.

          allOf:
          - "$ref": "#/components/schemas/_types.query_dsl.FieldValueFactorModifier"
      required:
      - field
      x-model: true
    _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
      x-model: true
    _types.query_dsl.ScriptScoreFunction:
      type: object
      properties:
        script:
          description: A script that computes a score.
          allOf:
          - "$ref": "#/components/schemas/_types.Script"
      required:
      - script
      x-model: true
    _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.
            Use 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.

            Supported values include:
              - `painless`: Painless scripting language, purpose-built for Elasticsearch.
              - `expression`: Lucene’s expressions language, compiles a JavaScript expression to bytecode.
              - `mustache`: Mustache templated, used for templates.
              - `java`: Expert Java API

          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.
            By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
            To page through more hits, use the `search_after` parameter.
          default: 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.
            If `true`, the exact number of hits is returned at the cost of some performance.
            If `false`, the  response does not include the total number of hits matching the query.
          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.
            The boost value is the factor by which scores are multiplied.
            A boost value greater than `1.0` increases the score.
            A 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.
            The 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
          oneOf:
          - "$ref": "#/components/schemas/_types.KnnSearch"
          - type: array
            items:
              "$ref": "#/components/schemas/_types.KnnSearch"
        min_score:
          description: |-
            The minimum `_score` for matching documents.
            Documents 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.
            The search hits are filtered after the aggregations are calculated.
            A 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.
            NOTE: 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.
            A retriever replaces other elements of the search API that also return top documents such as `query` and `knn`.
          x-state: Generally available
          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.
            By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
            To page through more hits, use the `search_after` property.
          default: 10
          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 <field>:<direction> 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.
            These fields are returned in the `hits._source` property of the search response.
            If the `stored_fields` property is specified, the `_source` property defaults to `false`.
            Otherwise, it defaults to `true`.
          allOf:
          - "$ref": "#/components/schemas/_global.search._types.SourceConfig"
        fields:
          description: |-
            An array of wildcard (`*`) field patterns.
            The 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.
            If a query reaches this limit, Elasticsearch terminates the query early.
            Elasticsearch collects documents before sorting.

            IMPORTANT: Use with caution.
            Elasticsearch applies this property to each shard handling the request.
            When possible, let Elasticsearch perform early termination automatically.
            Avoid specifying this property for requests that target data streams with backing indices across multiple data tiers.

            If set to `0` (default), the query does not terminate early.
          default: 0
          type: number
        timeout:
          description: |-
            The period of time to wait for a response from each shard.
            If no response is received before the timeout expires, the request fails and returns an error.
            Defaults 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.
            If no fields are specified, no stored fields are included in the response.
            If this field is specified, the `_source` property defaults to `false`.
            You 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).
            If you provide a PIT, you cannot specify an `<index>` 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.
            These 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.
            Each group maintains a statistics aggregation for its associated searches.
            You 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
      x-model: true
      externalDocs:
        url: https://www.elastic.co/docs/reference/elasticsearch/rest-apis/collapse-search-results
    _global.search._types.InnerHits:
      type: object
      properties:
        name:
          description: |-
            The name for the particular inner hit definition in the response.
            Useful 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
          type: number
        from:
          description: Inner hit starting document offset.
          default: 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`.
            By 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:
          description: |2+


            Supported values include:
              - `plain`: The `plain` highlighter uses the standard Lucene highlighter
              - `fvh`: The fvh highlighter uses the Lucene Fast Vector highlighter.
              - `unified`: The unified highlighter uses the Lucene Unified Highlighter.

          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
          type: number
        boundary_scanner:
          description: |+
            Specifies how to break the highlighted fragments: chars, sentence, or word.
            Only valid for the unified and fvh highlighters.
            Defaults to `sentence` for the `unified` highlighter. Defaults to `chars` for the `fvh` highlighter.

            Supported values include:
              - `chars`: Use the characters specified by `boundary_chars` as highlighting boundaries.
            The `boundary_max_scan` setting controls how far to scan for boundary characters.
            Only valid for the `fvh` highlighter.
              - `sentence`: Break highlighted fragments at the next sentence boundary, as determined by Java’s `BreakIterator`.
            You can specify the locale to use with `boundary_scanner_locale`.
            When used with the `unified` highlighter, the `sentence` scanner splits sentences bigger than `fragment_size` at the first word boundary next to fragment_size.
            You can set `fragment_size` to `0` to never split any sentence.
              - `word`: Break highlighted fragments at the next word boundary, as determined by Java’s `BreakIterator`.
            You can specify the locale to use with `boundary_scanner_locale`.

          allOf:
          - "$ref": "#/components/schemas/_global.search._types.BoundaryScanner"
        boundary_scanner_locale:
          description: |-
            Controls which locale is used to search for sentence and word boundaries.
            This 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`.
            Only 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
          type: number
        highlight_filter:
          type: boolean
        highlight_query:
          description: |-
            Highlight matches for a query other than the search query.
            This 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.
            The rest of the text is not processed, thus not highlighted and no error is returned
            The `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
          type: number
        number_of_fragments:
          description: |-
            The maximum number of fragments to return.
            If the number of fragments is set to `0`, no fragments are returned.
            Instead, the entire field contents are highlighted and returned.
            This can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required.
            If `number_of_fragments` is `0`, `fragment_size` is ignored.
          default: 5
          type: number
        options:
          type: object
          additionalProperties:
            type: object
        order:
          description: |-
            Sorts highlighted fragments by score when set to `score`.
            By default, fragments will be output in the order they appear in the field (order: `none`).
            Setting this option to `score` will output the most relevant fragments first.
            Each 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.
            Prevents the `fvh` highlighter from analyzing too many phrases and consuming too much memory.
            When using `matched_fields`, `phrase_limit` phrases per matched field are considered. Raising the limit increases query time and consumes more memory.
            Only supported by the `fvh` highlighter.
          default: 256
          type: number
        post_tags:
          description: |-
            Use in conjunction with `pre_tags` to define the HTML tags to use for the highlighted text.
            By default, highlighted text is wrapped in `<em>` and `</em>` 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.
            By default, highlighted text is wrapped in `<em>` and `</em>` tags.
          type: array
          items:
            type: string
        require_field_match:
          description: |-
            By default, only fields that contains a query match are highlighted.
            Set 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:
          description: |2+


            Supported values include:
              - `asc`: Ascending (smallest to largest)
              - `desc`: Descending (largest to smallest)

          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:
          description: |2+


            Supported values include:
              - `arc`: The `arc` calculation is the most accurate.
              - `plane`: The `plane` calculation is faster but less accurate.

          allOf:
          - "$ref": "#/components/schemas/_types.GeoDistanceType"
        ignore_unmapped:
          type: boolean
        order:
          description: |2+


            Supported values include:
              - `asc`: Ascending (smallest to largest)
              - `desc`: Descending (largest to smallest)

          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:
          description: |2+


            Supported values include:
              - `asc`: Ascending (smallest to largest)
              - `desc`: Descending (largest to smallest)

          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.

            This option takes precedence over `includes`: any vector field will
            remain 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
          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
          allOf:
          - "$ref": "#/components/schemas/_types.RescoreVector"
      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
            may be inferred for semantic_text fields
          x-state: Generally available
          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
    _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.
            This 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
          type: number
        rescore_query_weight:
          description: Relative importance of the rescore query versus the original
            query.
          default: 1
          type: number
        score_mode:
          description: |+
            Determines how scores are combined.

            Supported values include:
              - `avg`: Average the original score and the rescore query score.
              - `max`: Take the max of original score and the rescore query score.
              - `min`: Take the min of the original score and the rescore query score.
              - `multiply`: Multiply the original score by the rescore query score.
            Useful for `function` query rescores.
              - `total`: Add the original score and the rescore query score.

          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.
            This 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
            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
            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
          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
            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`.

             * If `strategy` is set to `recursive`, you must also specify:

            - `max_chunk_size`
            - either `separators` or`separator_group`

            Learn 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.

            Sets a predefined list of separators in the saved chunking settings based on the selected text type.
            Values can be `markdown` or `plaintext`.

            Using 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.

            A list of strings used as possible split points when chunking text.

            Each string can be a plain string or a regular expression (regex) pattern.
            The system tries each separator in order to split the text, starting from the first item in the list.

            After splitting, it attempts to recombine smaller pieces into larger chunks that stay within
            the `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.
            This value cannot be lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).
            This value should not exceed the window size for the associated model.
          default: 250
          type: number
        overlap:
          description: |-
            The number of overlapping words for chunks.
            It is applicable only to a `word` chunking strategy.
            This value cannot be higher than half the `max_chunk_size` value.
          default: 100
          type: number
        sentence_overlap:
          description: |-
            The number of overlapping sentences for chunks.
            It is applicable only for a `sentence` chunking strategy.
            It can be either `1` or `0`.
          default: 1
          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
            type: number
          prefix_length:
            description: Number of beginning characters left unchanged when creating
              expansions.
            default: 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
      x-model: true
    _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.
              Set to `COERCE` to also try to infer correct latitude or longitude.

              Supported values include:
                - `coerce`: Accept geo points with invalid latitude or longitude and additionally try and infer correct coordinates.
                - `ignore_malformed`: Accept geo points with invalid latitude or longitude.
                - `strict`

            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.
              Set to `false` to throw an exception if the field is not mapped.
            default: false
            type: boolean
      x-model: true
    _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.
              Points which fall into this circle are considered to be matches.
            allOf:
            - "$ref": "#/components/schemas/_types.Distance"
          distance_type:
            description: |+
              How to compute the distance.
              Set to `plane` for a faster calculation that's inaccurate on long distances and close to the poles.

              Supported values include:
                - `arc`: The `arc` calculation is the most accurate.
                - `plane`: The `plane` calculation is faster but less accurate.

            default: "'arc'"
            allOf:
            - "$ref": "#/components/schemas/_types.GeoDistanceType"
          validation_method:
            description: |+
              Set to `IGNORE_MALFORMED` to accept geo points with invalid latitude or longitude.
              Set to `COERCE` to also try to infer correct latitude or longitude.

              Supported values include:
                - `coerce`: Accept geo points with invalid latitude or longitude and additionally try and infer correct coordinates.
                - `ignore_malformed`: Accept geo points with invalid latitude or longitude.
                - `strict`

            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.
              Set to `false` to throw an exception if the field is not mapped.
            default: false
            type: boolean
        required:
        - distance
      x-model: true
    _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:
            description: |2+


              Supported values include:
                - `coerce`: Accept geo points with invalid latitude or longitude and additionally try and infer correct coordinates.
                - `ignore_malformed`: Accept geo points with invalid latitude or longitude.
                - `strict`

            default: "'strict'"
            allOf:
            - "$ref": "#/components/schemas/_types.query_dsl.GeoValidationMethod"
          ignore_unmapped:
            type: boolean
      x-model: true
    _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.
              Set to `false` to throw an exception if the field is not mapped.
            default: false
            type: boolean
      x-model: true
    _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.
              If 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.
              If 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.
              If 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
      x-model: true
    _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.
              You 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.
              If 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
      x-model: true
    _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"
      x-model: true
    _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
      x-model: true
    _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.
            Intervals produced by the rules further apart than this are not considered matches.
          default: -1
          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
      x-model: true
    _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
      x-model: true
    _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
      x-model: true
    _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.
            This script must return a boolean value: `true` or `false`.
          allOf:
          - "$ref": "#/components/schemas/_types.Script"
      minProperties: 1
      maxProperties: 1
      x-model: true
    _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
          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.
            The `term` is normalized using the search analyzer from this field, unless `analyzer` is specified separately.
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
      required:
      - term
      x-model: true
    _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.
            Terms further apart than this are not considered matches.
          default: -1
          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.
            The `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
      x-model: true
    _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.
            The `prefix` is normalized using the search analyzer from this field, unless `analyzer` is specified separately.
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
      required:
      - prefix
      x-model: true
    _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.
            The `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.
            The `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`.
            Defaults 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.
            The `pattern` is normalized using the search analyzer from this field, unless `analyzer` is specified separately.
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
      required:
      - pattern
      x-model: true
    _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
            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
            allOf:
            - "$ref": "#/components/schemas/_types.RescoreVector"
        required:
        - field
      x-model: true
    _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
            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
            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.

              Supported values include:
                - `all`: Returns all documents, similar to a `match_all` query.
                - `none`: No documents are returned if the `analyzer` removes all tokens.

            default: "'none'"
            allOf:
            - "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery"
        required:
        - query
      x-model: true
    _types.query_dsl.ZeroTermsQuery:
      type: string
      enum:
      - all
      - none
    _types.query_dsl.MatchAllQuery:
      allOf:
      - "$ref": "#/components/schemas/_types.query_dsl.QueryBase"
      - type: object
      x-model: true
    _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.
              Can 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.
              Can 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`).
              Can 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.
              Can be applied to the term subqueries constructed for all terms but the final term.
            default: 50
            type: number
          minimum_should_match:
            description: |-
              Minimum number of clauses that must match for a document to be returned.
              Applied to the constructed bool query.
            allOf:
            - "$ref": "#/components/schemas/_types.MinimumShouldMatch"
          operator:
            description: |-
              Boolean logic used to interpret text in the query value.
              Applied 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.
              Can be applied to the term subqueries constructed for all terms but the final term.
            default: 0
            type: number
          query:
            description: |-
              Terms you wish to find in the provided field.
              The last term is used in a prefix query.
            type: string
        required:
        - query
      x-model: true
    _types.query_dsl.MatchNoneQuery:
      allOf:
      - "$ref": "#/components/schemas/_types.query_dsl.QueryBase"
      - type: object
      x-model: true
    _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
            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.

              Supported values include:
                - `all`: Returns all documents, similar to a `match_all` query.
                - `none`: No documents are returned if the `analyzer` removes all tokens.

            default: "'none'"
            allOf:
            - "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery"
        required:
        - query
      x-model: true
    _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
            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
            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.

              Supported values include:
                - `all`: Returns all documents, similar to a `match_all` query.
                - `none`: No documents are returned if the `analyzer` removes all tokens.

            default: none
            allOf:
            - "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery"
        required:
        - query
      x-model: true
    _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.
              Defaults 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.
              This sets the boost factor to use when using this feature.
              Defaults to deactivated (0).
            default: 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.
              Defaults 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
            type: number
          max_word_length:
            description: |-
              The maximum word length above which the terms are ignored.
              Defaults to unbounded (`0`).
            default: 0
            type: number
          min_doc_freq:
            description: The minimum document frequency below which the terms are
              ignored from the input document.
            default: 5
            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
            type: number
          min_word_length:
            description: The minimum word length below which the terms are ignored.
            default: 0
            type: number
          routing:
            allOf:
            - "$ref": "#/components/schemas/_types.Routing"
          stop_words:
            description: |-
              An array of stop words.
              Any 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:
            description: |2+


              Supported values include:
                - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
                - `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.
                - `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.
              NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
              If used incorrectly, it can result in loss of data.

            default: "'internal'"
            allOf:
            - "$ref": "#/components/schemas/_types.VersionType"
        required:
        - like
      x-model: true
    _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:
          description: |2+


            Supported values include:
              - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
              - `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.
              - `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.
            NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
            If used incorrectly, it can result in loss of data.

          default: "'internal'"
          allOf:
          - "$ref": "#/components/schemas/_types.VersionType"
      x-model: true
    _types.VersionType:
      type: string
      enum:
      - internal
      - external
      - external_gte
    _types.analysis.StopWords:
      description: |-
        Language value, such as _arabic_ or _thai_. Defaults to _english_.
        Each 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.
        Also 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.
              Defaults 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`).
              Can 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
            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
            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
            type: number
          tie_breaker:
            description: Determines how scores for each per-term blended query and
              scores across groups are combined.
            default: 0
            type: number
          type:
            description: |+
              How `the` multi_match query is executed internally.

              Supported values include:
                - `best_fields`: Finds documents that match any field, but uses the `_score` from the best field.
                - `most_fields`: Finds documents that match any field and combines the `_score` from each field.
                - `cross_fields`: Treats fields with the same analyzer as though they were one big field.
              Looks for each word in any field.
                - `phrase`: Runs a `match_phrase` query on each field and uses the `_score` from the best field.
                - `phrase_prefix`: Runs a `match_phrase_prefix` query on each field and uses the `_score` from the best field.
                - `bool_prefix`: Creates a `match_bool_prefix` query on each field and combines the `_score` from each field.

            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.

              Supported values include:
                - `all`: Returns all documents, similar to a `match_all` query.
                - `none`: No documents are returned if the `analyzer` removes all tokens.

            default: "'none'"
            allOf:
            - "$ref": "#/components/schemas/_types.query_dsl.ZeroTermsQuery"
        required:
        - query
      x-model: true
    _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
      x-model: true
    _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"
      x-model: true
    _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
      x-model: true
    _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.
                Required 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.
                Required if `ids` is not specified.
              type: array
              items:
                "$ref": "#/components/schemas/_types.query_dsl.PinnedDoc"
          minProperties: 1
          maxProperties: 1
      x-model: true
    _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`.
              Default is `false` which means the case sensitivity of matching depends on the underlying field’s mapping.
            default: false
            x-state: Generally available
            type: boolean
        required:
        - value
      x-model: true
    _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.
              Supports wildcards (`*`).
              Defaults 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
            type: number
          fuzzy_prefix_length:
            description: Number of beginning characters left unchanged for fuzzy matching.
            default: 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
            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
            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.
              For 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.
              You 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.

              Supported values include:
                - `best_fields`: Finds documents that match any field, but uses the `_score` from the best field.
                - `most_fields`: Finds documents that match any field and combines the `_score` from each field.
                - `cross_fields`: Treats fields with the same analyzer as though they were one big field.
              Looks for each word in any field.
                - `phrase`: Runs a `match_phrase` query on each field and uses the `_score` from the best field.
                - `phrase_prefix`: Runs a `match_phrase_prefix` query on each field and uses the `_score` from the best field.
                - `bool_prefix`: Creates a `match_bool_prefix` query on each field and combines the `_score` from each field.

            default: "'best_fields'"
            allOf:
            - "$ref": "#/components/schemas/_types.query_dsl.TextQueryType"
        required:
        - query
      x-model: true
    _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"
      x-model: true
    _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.

              Supported values include:
                - `within`: Matches documents with a range field value entirely within the query’s range.
                - `contains`: Matches documents with a range field value that entirely contains the query’s range.
                - `intersects`: Matches documents with a range field value that intersects the query’s range.

            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.

              Supported values include:
                - `within`: Matches documents with a range field value entirely within the query’s range.
                - `contains`: Matches documents with a range field value that entirely contains the query’s range.
                - `intersects`: Matches documents with a range field value that intersects the query’s range.

            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.

              Supported values include:
                - `within`: Matches documents with a range field value entirely within the query’s range.
                - `contains`: Matches documents with a range field value that entirely contains the query’s range.
                - `intersects`: Matches documents with a range field value that intersects the query’s range.

            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.

              Supported values include:
                - `within`: Matches documents with a range field value entirely within the query’s range.
                - `contains`: Matches documents with a range field value that entirely contains the query’s range.
                - `intersects`: Matches documents with a range field value that intersects the query’s range.

            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
      x-model: true
    _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`.
              When `false`, case sensitivity of matching depends on the underlying field’s mapping.
            default: false
            x-state: Generally available
            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
            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
      x-model: true
    _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
      x-model: true
    _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.
              This script must return a boolean value, `true` or `false`.
            allOf:
            - "$ref": "#/components/schemas/_types.Script"
        required:
        - script
      x-model: true
    _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.
              Important: final relevance scores from the `script_score` query cannot be negative.
            allOf:
            - "$ref": "#/components/schemas/_types.Script"
        required:
        - query
        - script
      x-model: true
    _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
      x-model: true
    _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
      x-model: true
    _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.
              Accepts wildcard expressions.
              You also can boost relevance scores for matches to particular fields using a caret (`^`) notation.
              Defaults 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
            type: number
          fuzzy_prefix_length:
            description: Number of beginning characters left unchanged for fuzzy matching.
            default: 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
      x-model: true
    _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
        as a pipe-separated string

        Depending on the target language, code generators can use this hint to generate language specific
        flags 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.
              Matching 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.
              Matching spans from `big` that contain matches from `little` are returned.
            allOf:
            - "$ref": "#/components/schemas/_types.query_dsl.SpanQuery"
        required:
        - big
        - little
      x-model: true
    _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
      x-model: true
    _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
      x-model: true
    _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
      x-model: true
    _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
      x-model: true
    _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.
              Equivalent 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
            type: number
          pre:
            description: The number of tokens before the include span that can’t have
              overlap with the exclude span.
            default: 0
            type: number
        required:
        - exclude
        - include
      x-model: true
    _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
      x-model: true
    _types.query_dsl.SpanTermQuery:
      allOf:
      - "$ref": "#/components/schemas/_types.query_dsl.QueryBase"
      - type: object
        properties:
          value:
            allOf:
            - "$ref": "#/components/schemas/_types.FieldValue"
        required:
        - value
      x-model: true
    _types.query_dsl.SpanWithinQuery:
      allOf:
      - "$ref": "#/components/schemas/_types.query_dsl.QueryBase"
      - type: object
        properties:
          big:
            description: |-
              Can be any span query.
              Matching 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.
              Matching spans from `little` that are enclosed within `big` are returned.
            allOf:
            - "$ref": "#/components/schemas/_types.query_dsl.SpanQuery"
        required:
        - big
        - little
      x-model: true
    _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.
                This 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.
                If 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.
                If prune is true but the pruning_config is not specified, pruning will occur but default values will be used.
                Default: false
              x-state: Generally available
              type: boolean
            pruning_config:
              description: |-
                Optional pruning configuration.
                If enabled, this will omit non-significant tokens from the query in order to improve query performance.
                This is only used if prune is set to true.
                If prune is set to true but pruning_config is not specified, default values will be used.
              x-state: Generally available
              allOf:
              - "$ref": "#/components/schemas/_types.TokenPruningConfig"
          required:
          - field
        - type: object
          properties:
            query_vector:
              description: |-
                Dictionary of precomputed sparse vectors and their associated weights.
                Only 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.
                It must be the same inference ID that was used to create the tokens from the input text.
                Only one of inference_id and query_vector is allowed.
                If inference_id is specified, query must also be specified.
                Only one of inference_id or query_vector may be supplied in a request.
              allOf:
              - "$ref": "#/components/schemas/_types.Id"
          minProperties: 1
          maxProperties: 1
      x-model: true
    _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
          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`.
              When `false`, the case sensitivity of matching depends on the underlying field’s mapping.
            default: false
            x-state: Generally available
            type: boolean
        required:
        - value
      x-model: true
    _types.query_dsl.TermsQuery:
      allOf:
      - "$ref": "#/components/schemas/_types.query_dsl.QueryBase"
      - type: object
      x-model: true
    _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
            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
      x-model: true
    _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
            allOf:
            - "$ref": "#/components/schemas/_types.TokenPruningConfig"
        required:
        - model_id
        - model_text
      x-model: true
    _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
      x-model: true
    _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
            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
      x-model: true
    _types.query_dsl.WrapperQuery:
      allOf:
      - "$ref": "#/components/schemas/_types.query_dsl.QueryBase"
      - type: object
        properties:
          query:
            description: |-
              A base64 encoded query.
              The binary data format can be any of JSON, YAML, CBOR or SMILE encodings
            type: string
        required:
        - query
      x-model: true
    _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
            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.
              If no `format` is specified, the first date format specified in the field mapping is used.
            type: string
          minimum_interval:
            description: |-
              The minimum rounding interval.
              This 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.
              By 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"
      x-model: true
    _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.
            By 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
      x-model: true
    _types.aggregations.PipelineAggregationBase:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.BucketPathAggregation"
      - type: object
        properties:
          format:
            description: |-
              `DecimalFormat` pattern for the output value.
              If 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.

              Supported values include:
                - `skip`: Treats missing data as if the bucket does not exist. It will skip the bucket and
              continue calculating using the next available value.
                - `insert_zeros`: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.
                - `keep_values`: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used,
              otherwise the empty bucket is skipped.

            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
        forms depending on its type. Please refer to each aggregation's documentation to know what buckets
        path 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).
              To 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"
      x-model: true
    _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"
      x-model: true
    _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.

              Supported values include:
                - `skip`: Treats missing data as if the bucket does not exist. It will skip the bucket and
              continue calculating using the next available value.
                - `insert_zeros`: Replace missing values with a zero (0) and pipeline aggregation computation will proceed as normal.
                - `keep_values`: Similar to skip, except if the metric provides a non-null, non-NaN value this value is used,
              otherwise the empty bucket is skipped.

            default: skip
            allOf:
            - "$ref": "#/components/schemas/_types.aggregations.GapPolicy"
          size:
            description: |-
              The number of buckets to return.
              Defaults to all buckets of the parent aggregation.
            type: number
          sort:
            description: The list of fields to sort on.
            allOf:
            - "$ref": "#/components/schemas/_types.Sort"
      x-model: true
    _types.aggregations.BucketKsAggregation:
      description: |-
        A sibling pipeline aggregation which executes a two sample Kolmogorov–Smirnov test (referred
        to as a "K-S test" from now on) against a provided distribution, and the distribution implied
        by the documents counts in the configured sibling aggregation. Specifically, for some metric,
        assuming that the percentile intervals of the metric are known beforehand or have been computed
        by an aggregation, then one would use range aggregation for the sibling to compute the p-value
        of the distribution difference between the metric and the restriction of that metric to a subset
        of the documents. A natural use case is if the sibling aggregation range aggregation nested in a
        terms aggregation, in which case one compares the overall distribution of metric to its restriction
        to 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
              are: "greater", "less", "two_sided". This parameter is key for determining the K-S statistic used
              when 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.
              In typical usage this is the overall proportion of documents in each bucket, which is compared with the actual
              document proportions in each bucket from the sibling aggregation counts. The default is to assume that overall
              documents are uniformly distributed on these buckets, which they would be if one used equal percentiles of a
              metric 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.
              This determines the cumulative distribution function (CDF) points used comparing the two samples. Default is
              `upper_tail`, which emphasizes the upper end of the CDF points. Valid options are: `upper_tail`, `uniform`,
              and `lower_tail`.
            type: string
      x-model: true
    _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
      x-model: true
    _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
            than or equal to the sum of all values in the buckets_path as this is the originating superset of data
            to which the term values are correlated.
          type: number
        expectations:
          description: |-
            An array of numbers with which to correlate the configured `bucket_path` values.
            The 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
            the pre-calculated data and the buckets_path have known gaps. The length of fractions, if provided,
            must 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.
              This allows to trade memory for accuracy.
            default: 3000
            type: number
          rehash:
            type: boolean
          execution_hint:
            description: |+
              Mechanism by which cardinality aggregations is run.

              Supported values include:
                - `global_ordinals`: Run the aggregation by using global ordinals of the field and resolving those values after finishing a shard.
                - `segment_ordinals`: Run the aggregation by using segment ordinal values and resolving those values after each segment.
                - `direct`: Run the aggregation by using field values directly.
                - `save_memory_heuristic`: Heuristic-based mode, default in Elasticsearch 8.3 and earlier.
                - `save_time_heuristic`: Heuristic-based mode, default in Elasticsearch 8.4 and later.

            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
        field is re-analyzed using a custom analyzer. The resulting tokens are then categorized
        creating buckets of similarly formatted text values. This aggregation works best with machine
        generated 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.
              Smaller values use less memory and create fewer categories. Larger values will use more memory and
              create narrower categories. Max allowed value is 100.
            default: 50
            type: number
          max_matched_tokens:
            description: |-
              The maximum number of token positions to match on before attempting to merge categories. Larger
              values will use more memory and create narrower categories. Max allowed value is 100.
            default: 5
            type: number
          similarity_threshold:
            description: |-
              The minimum percentage of tokens that must match for text to be added to the category bucket. Must
              be between 1 and 100. The larger the value the narrower the categories. Larger values will increase memory
              usage and create narrower categories.
            default: 50
            type: number
          categorization_filters:
            description: |-
              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.
            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.
              The syntax is very similar to that used to define the analyzer in the analyze API. This property
              cannot 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
            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
      x-model: true
    _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
            type: number
          sources:
            description: |-
              The value sources used to build composite buckets.
              Keys 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:
          description: |2+


            Supported values include:
              - `asc`: Ascending (smallest to largest)
              - `desc`: Descending (largest to smallest)

          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
      x-model: true
    _types.aggregations.DateHistogramAggregation:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase"
      - type: object
        properties:
          calendar_interval:
            description: |-
              Calendar-aware interval.
              Can 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.
              If 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.
              By 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.
              By 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.
              Defaults 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
        according 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.
              By 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.

              Supported values include:
                - `map`: Hold field values directly.
                - `global_ordinals`: Hold ordinals of the field as determined by the Lucene index.
                - `bytes_hash`: Hold hashes of the field values - with potential for hash collisions.

            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
            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
            type: number
          field:
            description: The field used to provide values used for de-duplication.
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
      x-model: true
    _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
          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
          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.
            Can be regular expression strings or arrays of strings of exact terms.
          allOf:
          - "$ref": "#/components/schemas/_types.aggregations.TermsExclude"
        include:
          description: |-
            Values to include.
            Can 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.
              Set 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
        the 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.

              Supported values include:
                - `arc`: The `arc` calculation is the most accurate.
                - `plane`: The `plane` calculation is faster but less accurate.

            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.
              If 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.
              Defaults 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
            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.
            When 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).

            Supported values include:
              - `asc`: Ascending (smallest to largest)
              - `desc`: Descending (largest to smallest)

          default: asc
          allOf:
          - "$ref": "#/components/schemas/_types.SortOrder"
        size:
          description: |-
            The maximum length of the line represented in the aggregation.
            Valid sizes are between 1 and 10000.
          default: 10000
          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.
              If 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.
              Values 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.
              Defaults 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
            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.
              If 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
              in the results. Value should be between 0-15.
            default: 6
            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
            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.
              It 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.
              Must be a positive decimal.
            type: number
          min_doc_count:
            description: |-
              Only returns buckets that have `min_doc_count` number of documents.
              By 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.
              By 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`.
              The bucket boundaries can be shifted by using the `offset` option.
            type: number
          order:
            description: |-
              The sort order of the returned buckets.
              By 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].
              For 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
            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
          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
          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.
              By 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
      x-model: true
    _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
            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).
              To 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
      x-model: true
    _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:
          linear: "#/components/schemas/_types.aggregations.LinearMovingAverageAggregation"
          simple: "#/components/schemas/_types.aggregations.SimpleMovingAverageAggregation"
          ewma: "#/components/schemas/_types.aggregations.EwmaMovingAverageAggregation"
          holt: "#/components/schemas/_types.aggregations.HoltMovingAverageAggregation"
          holt_winters: "#/components/schemas/_types.aggregations.HoltWintersMovingAverageAggregation"
      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.
              Increasing `shift` by 1, moves the starting window position by 1 to the right.
            default: 0
            type: number
          keyed:
            type: boolean
      x-model: true
    _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.
              Increasing `shift` by 1, moves the starting window position by 1 to the right.
            default: 0
            type: number
          window:
            description: The size of window to "slide" across the histogram.
            type: number
      x-model: true
    _types.aggregations.MultiTermsAggregation:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase"
      - type: object
        properties:
          collect_mode:
            description: |+
              Specifies the strategy for data collection.

              Supported values include:
                - `depth_first`: Expands all branches of the aggregation tree in one depth-first pass, before any pruning occurs.
                - `breadth_first`: Caches the set of documents that fall into the uppermost buckets for subsequent replay.

            default: breadth_first
            allOf:
            - "$ref": "#/components/schemas/_types.aggregations.TermsAggregationCollectMode"
          order:
            description: |-
              Specifies the sort order of the buckets.
              Defaults 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
            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
            type: number
          shard_size:
            description: |-
              The number of candidate terms produced by each shard.
              By 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
            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.
            By 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.

              Supported values include:
                - `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.
                - `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.
                - `percent_of_sum`: This method normalizes each value so that it represents a percentage of the total sum it attributes to.
                - `mean`: This method normalizes such that each value is normalized by how much it differs from the average.
                - `z-score`: This method normalizes such that each value represents how far it is from the mean relative to the standard deviation.
                - `softmax`: This method normalizes such that each value is exponentiated and relative to the sum of the exponents of the original values.

            allOf:
            - "$ref": "#/components/schemas/_types.aggregations.NormalizeMethod"
      x-model: true
    _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.
              Set 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"
      x-model: true
    _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).
            To 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.
              Set 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.
              By 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
            type: number
          missing:
            description: |-
              The value to apply to documents that do not have a value.
              By default, documents without a value are ignored.
            allOf:
            - "$ref": "#/components/schemas/_types.aggregations.Missing"
          precision:
            description: |-
              The precision of the internal CuckooFilters.
              Smaller precision leads to better approximation, but higher memory usage.
            default: 0.001
            type: number
          value_type:
            type: string
      x-model: true
    _types.aggregations.RateAggregation:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.FormatMetricAggregationBase"
      - type: object
        properties:
          unit:
            description: |-
              The interval used to calculate the rate.
              By default, the interval of the `date_histogram` is used.
            allOf:
            - "$ref": "#/components/schemas/_types.aggregations.CalendarInterval"
          mode:
            description: |+
              How the rate is calculated.

              Supported values include:
                - `sum`: Calculates the sum of all values of the field.
                - `value_count`: Uses the number of values of the field.

            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.
              The default is empty, which means that it joins back to the root/main document level.
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
    _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
            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.
              Allows 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.
              Allows the aggregation to set up any initial state.
            allOf:
            - "$ref": "#/components/schemas/_types.Script"
          map_script:
            description: |-
              Run once per document collected.
              If 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.
              It 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.
              The 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.
              Must be a positive, non-zero integer.
            type: number
      x-model: true
    _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
            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.

              The p-value is the probability of obtaining test results at least as extreme as
              the results actually observed, under the assumption that the null hypothesis is
              correct. The p-value is calculated assuming that the foreground set and the
              background set are independent https://en.wikipedia.org/wiki/Bernoulli_trial, with the null
              hypothesis 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`.
              Terms 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.
              By 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
      x-model: true
    _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.
            Allows for consistent significance results at various scales.
            Note: `0` is a special value which means no normalization
          default: 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
            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.
              Values 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.
              By 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"
      x-model: true
    _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
      x-model: true
    _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.

              Supported values include:
                - `depth_first`: Expands all branches of the aggregation tree in one depth-first pass, before any pruning occurs.
                - `breadth_first`: Caches the set of documents that fall into the uppermost buckets for subsequent replay.

            allOf:
            - "$ref": "#/components/schemas/_types.aggregations.TermsAggregationCollectMode"
          exclude:
            description: |-
              Values to exclude.
              Accepts 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.
              Accepts 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
            type: number
          missing:
            description: |-
              The value to apply to documents that do not have a value.
              By 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.
              Defaults 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`.
              Terms 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.
              By 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
            type: number
          format:
            type: string
      x-model: true
    _types.aggregations.TimeSeriesAggregation:
      allOf:
      - "$ref": "#/components/schemas/_types.aggregations.BucketAggregationBase"
      - type: object
        properties:
          size:
            description: The maximum number of results to return.
            default: 10000
            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
              matching 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
            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
            type: number
          sort:
            description: |-
              Sort order of the top matching hits.
              By 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.

              Supported values include:
                - `paired`: Performs paired t-test.
                - `homoscedastic`: Performs two-sample equal variance test.
                - `heteroscedastic`: Performs two-sample unequal variance 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
            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
          type: number
        shard_size:
          description: |-
            The number of buckets that the coordinating node will request from each shard.
            Defaults 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.
            Defaults 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.
            If the document exists, it replaces the document and increments the version.
            The 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.
            The following line must contain the source data to be indexed.
          allOf:
          - "$ref": "#/components/schemas/_global.bulk.CreateOperation"
        update:
          description: |-
            Perform a partial document update.
            The 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.
              It defaults to an empty map.
              If a name matches a dynamic template, that template will be applied regardless of other match predicates defined in the template.
              If 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.
              If the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.
              If 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:
          description: |2+


            Supported values include:
              - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
              - `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.
              - `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.
            NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
            If used incorrectly, it can result in loss of data.

          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.
            You 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.
            If 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.
            If 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.
            The 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.
            This property is returned only for successful operations.
          type: number
        result:
          description: |-
            The result of the operation.
            Successful values are `created`, `deleted`, and `updated`.
          type: string
        _seq_no:
          description: |-
            The sequence number assigned to the document for the operation.
            Sequence 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.
            The document version is incremented each time the document is updated.
            This 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
    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
        is used to capture this behavior while keeping the semantics of the field type.

        Depending on the target language, code generators can keep the union or remove it and leniently parse
        strings 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
    _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.
            For indices with `semantic_text` fields or other nested field types,
            this count includes the internal nested documents.
            To get the logical document count (excluding nested documents), use
            the `_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
          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.CatDfaColumns:
      oneOf:
      - "$ref": "#/components/schemas/cat._types.CatDfaColumn"
      - type: array
        items:
          "$ref": "#/components/schemas/cat._types.CatDfaColumn"
    cat._types.CatDfaColumn:
      type: string
    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
    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.
            For 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.
            For 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.
            For 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.
            For 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
    cat.ml_jobs.JobsRecord:
      type: object
      properties:
        id:
          description: The anomaly detection job identifier.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        state:
          description: |+
            The status of the anomaly detection job.

            Supported values include:
              - `closing`: The job close action is in progress and has not yet completed. A closing job cannot accept further data.
              - `closed`: The job finished successfully with its model state persisted. The job must be opened before it can accept further data.
              - `opened`: The job is available to receive and process data.
              - `failed`: The job did not finish successfully due to an error.
            This 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.
            If the job had irrevocably failed, it must be force closed and then deleted.
            If the datafeed can be corrected, the job can be closed and then re-opened.
              - `opening`: The job open action is in progress and has not yet completed.

          allOf:
          - "$ref": "#/components/schemas/ml._types.JobState"
        opened_time:
          description: For open jobs only, the amount of time the job has been opened.
          type: string
        assignment_explanation:
          description: For open anomaly detection jobs only, contains messages relating
            to the selection of a node to run the job.
          type: string
        data.processed_records:
          description: |-
            The number of input documents that have been processed by the anomaly detection job.
            This value includes documents with missing fields, since they are nonetheless analyzed.
            If you use datafeeds and have aggregations in your search query, the `processed_record_count` is the number of aggregation results processed, not the number of Elasticsearch documents.
          type: string
        data.processed_fields:
          description: |-
            The total number of fields in all the documents that have been processed by the anomaly detection job.
            Only fields that are specified in the detector configuration object contribute to this count.
            The timestamp is not included in this count.
          type: string
        data.input_bytes:
          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.
          type: string
        data.input_fields:
          description: |-
            The total number of fields in input documents posted to the anomaly detection job.
            This count includes fields that are not used in the analysis.
            However, be aware that if you are using a datafeed, it extracts only the required fields from the documents it retrieves before posting them to the job.
          type: string
        data.invalid_dates:
          description: The number of input documents with either a missing date field
            or a date that could not be parsed.
          type: string
        data.missing_fields:
          description: |-
            The number of input documents that are missing a field that the anomaly detection job is configured to analyze.
            Input documents with missing fields are still processed because it is possible that not all fields are missing.
            If you are using datafeeds or posting data to the job in JSON format, a high `missing_field_count` is often not an indication of data issues.
            It is not necessarily a cause for concern.
          type: string
        data.out_of_order_timestamps:
          description: |-
            The number of input documents that have a timestamp chronologically preceding the start of the current anomaly detection bucket offset by the latency window.
            This information is applicable only when you provide data to the anomaly detection job by using the post data API.
            These out of order documents are discarded, since jobs require time series data to be in ascending chronological order.
          type: string
        data.empty_buckets:
          description: |-
            The number of buckets which did not contain any data.
            If your data contains many empty buckets, consider increasing your `bucket_span` or using functions that are tolerant to gaps in data such as mean, `non_null_sum` or `non_zero_count`.
          type: string
        data.sparse_buckets:
          description: |-
            The number of buckets that contained few data points compared to the expected number of data points.
            If your data contains many sparse buckets, consider using a longer `bucket_span`.
          type: string
        data.buckets:
          description: The total number of buckets processed.
          type: string
        data.earliest_record:
          description: The timestamp of the earliest chronologically input document.
          type: string
        data.latest_record:
          description: The timestamp of the latest chronologically input document.
          type: string
        data.last:
          description: The timestamp at which data was last analyzed, according to
            server time.
          type: string
        data.last_empty_bucket:
          description: The timestamp of the last bucket that did not contain any data.
          type: string
        data.last_sparse_bucket:
          description: The timestamp of the last bucket that was considered sparse.
          type: string
        model.bytes:
          description: |-
            The number of bytes of memory used by the models.
            This is the maximum value since the last time the model was persisted.
            If the job is closed, this value indicates the latest size.
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        model.memory_status:
          description: The status of the mathematical models.
          allOf:
          - "$ref": "#/components/schemas/ml._types.MemoryStatus"
        model.bytes_exceeded:
          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.
          type: string
        model.by_fields:
          description: |-
            The number of `by` field values that were analyzed by the models.
            This value is cumulative for all detectors in the job.
          type: string
        model.over_fields:
          description: |-
            The number of `over` field values that were analyzed by the models.
            This value is cumulative for all detectors in the job.
          type: string
        model.partition_fields:
          description: |-
            The number of `partition` field values that were analyzed by the models.
            This value is cumulative for all detectors in the job.
          type: string
        model.bucket_allocation_failures:
          description: |-
            The number of buckets for which new entities in incoming data were not processed due to insufficient model memory.
            This situation is also signified by a `hard_limit: memory_status` property value.
          type: string
        model.categorization_status:
          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.
          type: string
        model.total_category_count:
          description: The number of categories created by categorization.
          type: string
        model.frequent_category_count:
          description: The number of categories that match more than 1% of categorized
            documents.
          type: string
        model.rare_category_count:
          description: The number of categories that match just one categorized document.
          type: string
        model.dead_category_count:
          description: |-
            The number of categories created by categorization that will never be assigned again because another category’s definition makes it a superset of the dead category.
            Dead categories are a side effect of the way categorization has no prior training.
          type: string
        model.failed_category_count:
          description: |-
            The number of times that categorization wanted to create a new category but couldn’t because the job had hit its `model_memory_limit`.
            This count does not track which specific categories failed to be created.
            Therefore you cannot use this value to determine the number of unique categories that were missed.
          type: string
        model.log_time:
          description: The timestamp when the model stats were gathered, according
            to server time.
          type: string
        model.timestamp:
          description: The timestamp of the last record when the model stats were
            gathered.
          type: string
        forecasts.total:
          description: |-
            The number of individual forecasts currently available for the job.
            A value of one or more indicates that forecasts exist.
          type: string
        forecasts.memory.min:
          description: The minimum memory usage in bytes for forecasts related to
            the anomaly detection job.
          type: string
        forecasts.memory.max:
          description: The maximum memory usage in bytes for forecasts related to
            the anomaly detection job.
          type: string
        forecasts.memory.avg:
          description: The average memory usage in bytes for forecasts related to
            the anomaly detection job.
          type: string
        forecasts.memory.total:
          description: The total memory usage in bytes for forecasts related to the
            anomaly detection job.
          type: string
        forecasts.records.min:
          description: The minimum number of `model_forecast` documents written for
            forecasts related to the anomaly detection job.
          type: string
        forecasts.records.max:
          description: The maximum number of `model_forecast` documents written for
            forecasts related to the anomaly detection job.
          type: string
        forecasts.records.avg:
          description: The average number of `model_forecast` documents written for
            forecasts related to the anomaly detection job.
          type: string
        forecasts.records.total:
          description: The total number of `model_forecast` documents written for
            forecasts related to the anomaly detection job.
          type: string
        forecasts.time.min:
          description: The minimum runtime in milliseconds for forecasts related to
            the anomaly detection job.
          type: string
        forecasts.time.max:
          description: The maximum runtime in milliseconds for forecasts related to
            the anomaly detection job.
          type: string
        forecasts.time.avg:
          description: The average runtime in milliseconds for forecasts related to
            the anomaly detection job.
          type: string
        forecasts.time.total:
          description: The total runtime in milliseconds for forecasts related to
            the anomaly detection job.
          type: string
        node.id:
          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:
          description: The ephemeral identifier of the assigned node.
          allOf:
          - "$ref": "#/components/schemas/_types.NodeId"
        node.address:
          description: The network address of the assigned node.
          type: string
        buckets.count:
          description: The number of bucket results produced by the job.
          type: string
        buckets.time.total:
          description: The sum of all bucket processing times, in milliseconds.
          type: string
        buckets.time.min:
          description: The minimum of all bucket processing times, in milliseconds.
          type: string
        buckets.time.max:
          description: The maximum of all bucket processing times, in milliseconds.
          type: string
        buckets.time.exp_avg:
          description: The exponential moving average of all bucket processing times,
            in milliseconds.
          type: string
        buckets.time.exp_avg_hour:
          description: The exponential moving average of bucket processing times calculated
            in a one hour time window, in milliseconds.
          type: string
    ml._types.JobState:
      type: string
      enum:
      - closing
      - closed
      - opened
      - failed
      - opening
    _types.ByteSize:
      oneOf:
      - type: number
      - type: string
    ml._types.MemoryStatus:
      type: string
      enum:
      - ok
      - soft_limit
      - hard_limit
    ml._types.CategorizationStatus:
      type: string
      enum:
      - ok
      - warn
    cat._types.CatTrainedModelsColumns:
      oneOf:
      - "$ref": "#/components/schemas/cat._types.CatTrainedModelsColumn"
      - type: array
        items:
          "$ref": "#/components/schemas/cat._types.CatTrainedModelsColumn"
    cat._types.CatTrainedModelsColumn:
      type: string
    cat.ml_trained_models.TrainedModelsRecord:
      type: object
      properties:
        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:
          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.
            This number helps to measure the computational complexity of the model.
          type: string
        license:
          description: The license level of the model.
          type: string
        create_time:
          description: The time the model was created.
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        version:
          description: The version of Elasticsearch when the model was created.
          allOf:
          - "$ref": "#/components/schemas/_types.VersionString"
        description:
          description: A description of the model.
          type: string
        ingest.pipelines:
          description: The number of pipelines that are referencing the model.
          type: string
        ingest.count:
          description: The total number of documents that are processed by the model.
          type: string
        ingest.time:
          description: The total time spent processing documents with thie model.
          type: string
        ingest.current:
          description: The total number of documents that are currently being handled
            by the model.
          type: string
        ingest.failed:
          description: The total number of failed ingest attempts with the model.
          type: string
        data_frame.id:
          description: |-
            The identifier for the data frame analytics job that created the model.
            Only displayed if the job is still available.
          type: string
        data_frame.create_time:
          description: The time the data frame analytics job was created.
          type: string
        data_frame.source_index:
          description: The source index used to train in the data frame analysis.
          type: string
        data_frame.analysis:
          description: The analysis used by the data frame to build the model.
          type: string
        type:
          x-state: Generally available
          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
    cat.transforms.TransformsRecord:
      type: object
      properties:
        id:
          description: The transform identifier.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        state:
          description: |-
            The status of the transform.
            Returned values include:
            `aborting`: The transform is aborting.
            `failed: The transform failed. For more information about the failure, check the `reason` field.
            `indexing`: The transform is actively processing data and creating new documents.
            `started`: The transform is running but not actively indexing data.
            `stopped`: The transform is stopped.
            `stopping`: The transform is stopping.
          type: string
        checkpoint:
          description: The sequence number for the checkpoint.
          type: string
        documents_processed:
          description: The number of documents that have been processed from the source
            index of the transform.
          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.
            This 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.
          type: 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
        docs_per_second:
          description: The number of input documents per second.
          type: string
        reason:
          description: If a transform has a `failed` state, these details describe
            the reason for failure.
          type: string
        search_total:
          description: The total number of search operations on the source index for
            the transform.
          type: string
        search_failure:
          description: The total number of search failures.
          type: string
        search_time:
          description: The total amount of search time, in milliseconds.
          type: string
        index_total:
          description: The total number of index operations done by the transform.
          type: string
        index_failure:
          description: The total number of indexing failures.
          type: string
        index_time:
          description: The total time spent indexing documents, in milliseconds.
          type: string
        documents_indexed:
          description: The number of documents that have been indexed into the destination
            index for the transform.
          type: string
        delete_time:
          description: The total time spent deleting documents, in milliseconds.
          type: string
        documents_deleted:
          description: The number of documents deleted from the destination index
            due to the retention policy for the transform.
          type: string
        trigger_count:
          description: |-
            The number of times the transform has been triggered by the scheduler.
            For 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
        pages_processed:
          description: |-
            The number of search or bulk index operations processed.
            Documents are processed in batches instead of individually.
          type: string
        processing_time:
          description: The total time spent processing results, in milliseconds.
          type: string
        checkpoint_duration_time_exp_avg:
          description: The exponential moving average of the duration of the checkpoint,
            in milliseconds.
          type: string
        indexed_documents_exp_avg:
          description: The exponential moving average of the number of new documents
            that have been indexed.
          type: string
        processed_documents_exp_avg:
          description: The exponential moving average of the number of documents that
            have been processed.
          type: string
    _types.ScrollIds:
      oneOf:
      - "$ref": "#/components/schemas/_types.ScrollId"
      - type: array
        items:
          "$ref": "#/components/schemas/_types.ScrollId"
    cluster._types.ComponentTemplate:
      type: object
      properties:
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
        component_template:
          allOf:
          - "$ref": "#/components/schemas/cluster._types.ComponentTemplateNode"
      required:
      - name
      - component_template
    cluster._types.ComponentTemplateNode:
      type: object
      properties:
        template:
          allOf:
          - "$ref": "#/components/schemas/cluster._types.ComponentTemplateSummary"
        version:
          allOf:
          - "$ref": "#/components/schemas/_types.VersionNumber"
        _meta:
          allOf:
          - "$ref": "#/components/schemas/_types.Metadata"
        deprecated:
          type: boolean
        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
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        created_date_millis:
          description: Date and time when the component template was created, in milliseconds
            since the epoch.
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
        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
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        modified_date_millis:
          description: Date and time when the component template was last modified,
            in milliseconds since the epoch.
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
      required:
      - template
    cluster._types.ComponentTemplateSummary:
      type: object
      properties:
        _meta:
          allOf:
          - "$ref": "#/components/schemas/_types.Metadata"
        version:
          allOf:
          - "$ref": "#/components/schemas/_types.VersionNumber"
        settings:
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/indices._types.IndexSettings"
        mappings:
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.TypeMapping"
        aliases:
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/indices._types.AliasDefinition"
        lifecycle:
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover"
        data_stream_options:
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/indices._types.DataStreamOptions"
    indices._types.IndexSettings:
      type: object
      x-model: true
      externalDocs:
        description: Index settings
        url: https://www.elastic.co/docs/reference/elasticsearch/index-settings/
    indices._types.SoftDeletes:
      type: object
      properties:
        enabled:
          description: Indicates whether soft deletes are enabled on the index.
          default: true
          type: boolean
        retention_lease:
          description: |-
            The maximum period to retain a shard history retention lease before it is considered expired.
            Shard history retention leases ensure that soft deletes are retained during merges on the Lucene
            index. If a soft delete is merged away before it can be replicated to a follower the following
            process will fail due to incomplete history on the leader.
          allOf:
          - "$ref": "#/components/schemas/indices._types.RetentionLease"
    indices._types.RetentionLease:
      type: object
      properties:
        period:
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
      required:
      - period
    indices._types.IndexSegmentSort:
      type: object
      properties:
        field:
          allOf:
          - "$ref": "#/components/schemas/_types.Fields"
        order:
          description: |2+


            Supported values include: `asc` (or `ASC`), `desc` (or `DESC`)

          oneOf:
          - "$ref": "#/components/schemas/indices._types.SegmentSortOrder"
          - type: array
            items:
              "$ref": "#/components/schemas/indices._types.SegmentSortOrder"
        mode:
          description: |2+


            Supported values include: `min` (or `MIN`), `max` (or `MAX`)

          oneOf:
          - "$ref": "#/components/schemas/indices._types.SegmentSortMode"
          - type: array
            items:
              "$ref": "#/components/schemas/indices._types.SegmentSortMode"
        missing:
          description: |2+


            Supported values include: `_last`, `_first`

          oneOf:
          - "$ref": "#/components/schemas/indices._types.SegmentSortMissing"
          - type: array
            items:
              "$ref": "#/components/schemas/indices._types.SegmentSortMissing"
    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
        is used to capture this behavior while keeping the semantics of the field type.

        Depending on the target language, code generators can keep the union or remove it and leniently parse
        strings to the target type.
      oneOf:
      - type: number
      - 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
        to a missing value. It is used for exemple in settings, where using the `NullValue` for a setting will reset
        it to its default value.
      type: string
    indices._types.Merge:
      type: object
      properties:
        scheduler:
          allOf:
          - "$ref": "#/components/schemas/indices._types.MergeScheduler"
    indices._types.MergeScheduler:
      type: object
      properties:
        max_thread_count:
          allOf:
          - "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger"
        max_merge_count:
          allOf:
          - "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger"
    indices._types.SettingsSearch:
      type: object
      properties:
        idle:
          allOf:
          - "$ref": "#/components/schemas/indices._types.SearchIdle"
        slowlog:
          allOf:
          - "$ref": "#/components/schemas/indices._types.SlowlogSettings"
    indices._types.SearchIdle:
      type: object
      properties:
        after:
          default: 30s
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
    indices._types.SlowlogSettings:
      type: object
      properties:
        level:
          type: string
        source:
          type: number
        reformat:
          type: boolean
        threshold:
          allOf:
          - "$ref": "#/components/schemas/indices._types.SlowlogTresholds"
    indices._types.SlowlogTresholds:
      type: object
      properties:
        query:
          allOf:
          - "$ref": "#/components/schemas/indices._types.SlowlogTresholdLevels"
        fetch:
          allOf:
          - "$ref": "#/components/schemas/indices._types.SlowlogTresholdLevels"
    indices._types.SlowlogTresholdLevels:
      type: object
      properties:
        warn:
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        info:
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        debug:
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        trace:
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
    indices._types.IndexSettingBlocks:
      type: object
      properties:
        read_only:
          allOf:
          - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean"
        read_only_allow_delete:
          allOf:
          - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean"
        read:
          allOf:
          - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean"
        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
        is used to capture this behavior while keeping the semantics of the field type.

        Depending on the target language, code generators can keep the union or remove it and leniently parse
        strings to the target type.
      oneOf:
      - type: boolean
      - type: string
    indices._types.SettingsAnalyze:
      type: object
      properties:
        max_token_count:
          default: '10000'
          allOf:
          - "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger"
    indices._types.SettingsHighlight:
      type: object
      properties:
        max_analyzed_offset:
          default: 1000000
          type: number
    indices._types.IndexRouting:
      type: object
      properties:
        allocation:
          allOf:
          - "$ref": "#/components/schemas/indices._types.IndexRoutingAllocation"
        rebalance:
          allOf:
          - "$ref": "#/components/schemas/indices._types.IndexRoutingRebalance"
    indices._types.IndexRoutingAllocation:
      type: object
      properties:
        enable:
          allOf:
          - "$ref": "#/components/schemas/indices._types.IndexRoutingAllocationOptions"
        include:
          allOf:
          - "$ref": "#/components/schemas/indices._types.IndexRoutingAllocationInclude"
        initial_recovery:
          allOf:
          - "$ref": "#/components/schemas/indices._types.IndexRoutingAllocationInitialRecovery"
        disk:
          allOf:
          - "$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:
          type: string
        _id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
    indices._types.IndexRoutingAllocationInitialRecovery:
      type: object
      properties:
        _id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
    indices._types.IndexRoutingAllocationDisk:
      type: object
      properties:
        threshold_enabled:
          oneOf:
          - type: boolean
          - type: string
    indices._types.IndexRoutingRebalance:
      type: object
      properties:
        enable:
          allOf:
          - "$ref": "#/components/schemas/indices._types.IndexRoutingRebalanceOptions"
      required:
      - enable
    indices._types.IndexRoutingRebalanceOptions:
      type: string
      enum:
      - all
      - primaries
      - replicas
      - none
    _types.PipelineName:
      type: string
    indices._types.IndexSettingsLifecycle:
      type: object
      properties:
        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"
        indexing_complete:
          description: |-
            Indicates whether or not the index has been rolled over. Automatically set to true when ILM completes the rollover action.
            You can explicitly set it to skip rollover.
          default: 'false'
          allOf:
          - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean"
        origination_date:
          description: |-
            If specified, this is the timestamp used to calculate the index age for its phase transitions. Use this setting
            if you create a new index that contains old data and want to use the original creation date to calculate the index
            age. Specified as a Unix epoch value in milliseconds.
          default: 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
            for its phase transitions. The index name must match the pattern ^.*-{date_format}-\\d+, where the date_format is
            yyyy.MM.dd and the trailing digits are optional. An index that was rolled over would normally match the full format,
            for 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.
            When the index rolls over, the alias is updated to reflect that the index is no longer the write index. For more
            information about rolling indices, see Rollover.
          default: ''
          type: string
        prefer_ilm:
          description: |-
            Preference for the system that manages a data stream backing index (preferring ILM when both ILM and DLM are
            applicable for an index).
          default: 'true'
          oneOf:
          - type: boolean
          - type: string
    indices._types.IndexSettingsLifecycleStep:
      type: object
      properties:
        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).
            See 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
        is used to capture this behavior while keeping the semantics of the field type.

        Depending on the target language, code generators can keep the union or remove it and leniently parse
        strings to the target type.
      oneOf:
      - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
      - type: string
    _types.Uuid:
      type: string
    indices._types.IndexVersioning:
      type: object
      properties:
        created:
          allOf:
          - "$ref": "#/components/schemas/_types.VersionString"
        created_string:
          type: string
    indices._types.Translog:
      type: object
      properties:
        sync_interval:
          description: |-
            How often the translog is fsynced to disk and committed, regardless of write operations.
            Values less than 100ms are not allowed.
          default: 5s
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        durability:
          description: |+
            Whether or not to `fsync` and commit the translog after every index, delete, update, or bulk request.

            Supported values include:
              - `request` (or `REQUEST`): (default) fsync and commit after every request. In the event of hardware failure, all acknowledged writes
            will already have been committed to disk.
              - `async` (or `ASYNC`): fsync and commit in the background every sync_interval. In the event of a failure, all acknowledged writes
            since the last automatic commit will be discarded.

          default: string
          allOf:
          - "$ref": "#/components/schemas/indices._types.TranslogDurability"
        flush_threshold_size:
          description: |-
            The translog stores all operations that are not yet safely persisted in Lucene (i.e., are not
            part of a Lucene commit point). Although these operations are available for reads, they will need
            to be replayed if the shard was stopped and had to be recovered. This setting controls the
            maximum total size of these operations, to prevent recoveries from taking too long. Once the
            maximum size has been reached a flush will happen, generating a new Lucene commit point.
          default: 512mb
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        retention:
          allOf:
          - "$ref": "#/components/schemas/indices._types.TranslogRetention"
    indices._types.TranslogDurability:
      type: string
      enum:
      - request
      - REQUEST
      - async
      - ASYNC
    indices._types.TranslogRetention:
      type: object
      properties:
        size:
          description: |-
            This controls the total size of translog files to keep for each shard. Keeping more translog files increases
            the chance of performing an operation based sync when recovering a replica. If the translog files are not
            sufficient, replica recovery will fall back to a file based sync. This setting is ignored, and should not be
            set, if soft deletes are enabled. Soft deletes are enabled by default in indices created in Elasticsearch
            versions 7.0.0 and later.
          default: 512mb
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        age:
          description: |-
            This controls the maximum duration for which translog files are kept by each shard. Keeping more
            translog files increases the chance of performing an operation based sync when recovering replicas. If
            the translog files are not sufficient, replica recovery will fall back to a file based sync. This setting
            is ignored, and should not be set, if soft deletes are enabled. Soft deletes are enabled by default in
            indices created in Elasticsearch versions 7.0.0 and later.
          default: 12h
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
    indices._types.SettingsQueryString:
      type: object
      properties:
        lenient:
          allOf:
          - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean"
      required:
      - lenient
    indices._types.IndexSettingsAnalysis:
      type: object
      properties:
        analyzer:
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/_types.analysis.Analyzer"
        char_filter:
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/_types.analysis.CharFilter"
        filter:
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/_types.analysis.TokenFilter"
        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:
          custom: "#/components/schemas/_types.analysis.CustomAnalyzer"
          fingerprint: "#/components/schemas/_types.analysis.FingerprintAnalyzer"
          keyword: "#/components/schemas/_types.analysis.KeywordAnalyzer"
          nori: "#/components/schemas/_types.analysis.NoriAnalyzer"
          pattern: "#/components/schemas/_types.analysis.PatternAnalyzer"
          simple: "#/components/schemas/_types.analysis.SimpleAnalyzer"
          standard: "#/components/schemas/_types.analysis.StandardAnalyzer"
          stop: "#/components/schemas/_types.analysis.StopAnalyzer"
          whitespace: "#/components/schemas/_types.analysis.WhitespaceAnalyzer"
          icu_analyzer: "#/components/schemas/_types.analysis.IcuAnalyzer"
          kuromoji: "#/components/schemas/_types.analysis.KuromojiAnalyzer"
          snowball: "#/components/schemas/_types.analysis.SnowballAnalyzer"
          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"
          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"
          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"
          indonesian: "#/components/schemas/_types.analysis.IndonesianAnalyzer"
          irish: "#/components/schemas/_types.analysis.IrishAnalyzer"
          italian: "#/components/schemas/_types.analysis.ItalianAnalyzer"
          latvian: "#/components/schemas/_types.analysis.LatvianAnalyzer"
          lithuanian: "#/components/schemas/_types.analysis.LithuanianAnalyzer"
          norwegian: "#/components/schemas/_types.analysis.NorwegianAnalyzer"
          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"
          sorani: "#/components/schemas/_types.analysis.SoraniAnalyzer"
          spanish: "#/components/schemas/_types.analysis.SpanishAnalyzer"
          swedish: "#/components/schemas/_types.analysis.SwedishAnalyzer"
          turkish: "#/components/schemas/_types.analysis.TurkishAnalyzer"
          thai: "#/components/schemas/_types.analysis.ThaiAnalyzer"
      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.CustomAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - custom
        char_filter:
          oneOf:
          - type: string
          - type: array
            items:
              type: string
        filter:
          oneOf:
          - type: string
          - type: array
            items:
              type: string
        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:
          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.
            Defaults to `255`
          default: 255
          type: number
        separator:
          description: |-
            The character to use to concatenate the terms.
            Defaults to a space.
          type: string
        stopwords:
          description: |-
            A pre-defined stop words list like `_english_` or an array containing a list of stop words.
            Defaults to `_none_`.
          default: _none_
          allOf:
          - "$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:
          deprecated: true
          allOf:
          - "$ref": "#/components/schemas/_types.VersionString"
      required:
      - type
    _types.analysis.NoriAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - nori
        version:
          deprecated: true
          allOf:
          - "$ref": "#/components/schemas/_types.VersionString"
        decompound_mode:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.NoriDecompoundMode"
        stoptags:
          type: array
          items:
            type: string
        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
        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.
            Defaults to `true`.
          default: true
          type: boolean
        pattern:
          description: |-
            A Java regular expression.
            Defaults to `\W+`.
          default: "\\W+"
          type: string
        stopwords:
          description: |-
            A pre-defined stop words list like `_english_` or an array containing a list of stop words.
            Defaults to `_none_`.
          default: _none_
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        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
        version:
          deprecated: true
          allOf:
          - "$ref": "#/components/schemas/_types.VersionString"
      required:
      - type
    _types.analysis.StandardAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - 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.
            Defaults to `255`.
          default: 255
          type: number
        stopwords:
          description: |-
            A pre-defined stop words list like `_english_` or an array containing a list of stop words.
            Defaults to `_none_`.
          default: _none_
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          description: The path to a file containing stop words.
          type: string
      required:
      - type
    _types.analysis.StopAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - stop
        version:
          deprecated: true
          allOf:
          - "$ref": "#/components/schemas/_types.VersionString"
        stopwords:
          description: |-
            A pre-defined stop words list like `_english_` or an array containing a list of stop words.
            Defaults to `_none_`.
          default: _none_
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          description: The path to a file containing stop words.
          type: string
      required:
      - type
    _types.analysis.WhitespaceAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - whitespace
        version:
          deprecated: true
          allOf:
          - "$ref": "#/components/schemas/_types.VersionString"
      required:
      - type
    _types.analysis.IcuAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - icu_analyzer
        method:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.IcuNormalizationType"
        mode:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.IcuNormalizationMode"
      required:
      - type
      - method
      - mode
    _types.analysis.IcuNormalizationType:
      type: string
      enum:
      - nfc
      - nfkc
      - nfkc_cf
    _types.analysis.IcuNormalizationMode:
      type: string
      enum:
      - decompose
      - compose
    _types.analysis.KuromojiAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - kuromoji
        mode:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.KuromojiTokenizationMode"
        user_dictionary:
          type: string
      required:
      - type
    _types.analysis.KuromojiTokenizationMode:
      type: string
      enum:
      - normal
      - search
      - extended
    _types.analysis.SnowballAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - snowball
        version:
          deprecated: true
          allOf:
          - "$ref": "#/components/schemas/_types.VersionString"
        language:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.SnowballLanguage"
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
      required:
      - type
      - language
    _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.ArabicAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - arabic
        stopwords:
          allOf:
          - "$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:
          allOf:
          - "$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:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.BengaliAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - bengali
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        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:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
      required:
      - type
    _types.analysis.BulgarianAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - bulgarian
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.CatalanAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - catalan
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.ChineseAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - chinese
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
      required:
      - type
    _types.analysis.CjkAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - cjk
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
      required:
      - type
    _types.analysis.CzechAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - czech
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.DanishAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - danish
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
      required:
      - type
    _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.EnglishAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - english
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.EstonianAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - estonian
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
      required:
      - type
    _types.analysis.FinnishAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - finnish
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.FrenchAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - french
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.GalicianAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - galician
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.GermanAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - german
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.GreekAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - greek
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
      required:
      - type
    _types.analysis.HindiAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - hindi
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.HungarianAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - hungarian
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.IndonesianAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - indonesian
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.IrishAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - irish
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.ItalianAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - italian
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.LatvianAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - latvian
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.LithuanianAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - lithuanian
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.NorwegianAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - norwegian
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.PersianAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - persian
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
      required:
      - type
    _types.analysis.PortugueseAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - portuguese
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.RomanianAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - romanian
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.RussianAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - russian
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.SerbianAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - serbian
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.SoraniAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - sorani
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.SpanishAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - spanish
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.SwedishAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - swedish
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.TurkishAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - turkish
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
        stem_exclusion:
          type: array
          items:
            type: string
      required:
      - type
    _types.analysis.ThaiAnalyzer:
      type: object
      properties:
        type:
          type: string
          enum:
          - thai
        stopwords:
          allOf:
          - "$ref": "#/components/schemas/_types.analysis.StopWords"
        stopwords_path:
          type: string
      required:
      - type
    _types.analysis.CharFilter:
      externalDocs:
        url: https://www.elastic.co/docs/reference/text-analysis/character-filter-reference
      x-model: true
    _types.analysis.CharFilterDefinition:
      discriminator:
        propertyName: type
        mapping:
          html_strip: "#/components/schemas/_types.analysis.HtmlStripCharFilter"
          mapping: "#/components/schemas/_types.analysis.MappingCharFilter"
          pattern_replace: "#/components/schemas/_types.analysis.PatternReplaceCharFilter"
          icu_normalizer: "#/components/schemas/_types.analysis.IcuNormalizationCharFilter"
          kuromoji_iteration_mark: "#/components/schemas/_types.analysis.KuromojiIterationMarkCharFilter"
      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.HtmlStripCharFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.CharFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - html_strip
          escaped_tags:
            type: array
            items:
              type: string
        required:
        - type
    _types.analysis.CharFilterBase:
      type: object
      properties:
        version:
          allOf:
          - "$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
    _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
        required:
        - type
        - pattern
    _types.analysis.IcuNormalizationCharFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.CharFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - icu_normalizer
          mode:
            allOf:
            - "$ref": "#/components/schemas/_types.analysis.IcuNormalizationMode"
          name:
            allOf:
            - "$ref": "#/components/schemas/_types.analysis.IcuNormalizationType"
          unicode_set_filter:
            type: string
        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
        required:
        - type
        - normalize_kana
        - normalize_kanji
    _types.analysis.TokenFilter:
      externalDocs:
        url: https://www.elastic.co/docs/reference/text-analysis/token-filter-reference
      x-model: true
    _types.analysis.TokenFilterDefinition:
      discriminator:
        propertyName: type
        mapping:
          apostrophe: "#/components/schemas/_types.analysis.ApostropheTokenFilter"
          arabic_stem: "#/components/schemas/_types.analysis.ArabicStemTokenFilter"
          arabic_normalization: "#/components/schemas/_types.analysis.ArabicNormalizationTokenFilter"
          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"
          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"
          indic_normalization: "#/components/schemas/_types.analysis.IndicNormalizationTokenFilter"
          keep_types: "#/components/schemas/_types.analysis.KeepTypesTokenFilter"
          keep: "#/components/schemas/_types.analysis.KeepWordsTokenFilter"
          keyword_marker: "#/components/schemas/_types.analysis.KeywordMarkerTokenFilter"
          keyword_repeat: "#/components/schemas/_types.analysis.KeywordRepeatTokenFilter"
          kstem: "#/components/schemas/_types.analysis.KStemTokenFilter"
          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"
          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_override: "#/components/schemas/_types.analysis.StemmerOverrideTokenFilter"
          stemmer: "#/components/schemas/_types.analysis.StemmerTokenFilter"
          stop: "#/components/schemas/_types.analysis.StopTokenFilter"
          synonym_graph: "#/components/schemas/_types.analysis.SynonymGraphTokenFilter"
          synonym: "#/components/schemas/_types.analysis.SynonymTokenFilter"
          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_graph: "#/components/schemas/_types.analysis.WordDelimiterGraphTokenFilter"
          word_delimiter: "#/components/schemas/_types.analysis.WordDelimiterTokenFilter"
          ja_stop: "#/components/schemas/_types.analysis.JaStopTokenFilter"
          kuromoji_stemmer: "#/components/schemas/_types.analysis.KuromojiStemmerTokenFilter"
          kuromoji_readingform: "#/components/schemas/_types.analysis.KuromojiReadingFormTokenFilter"
          kuromoji_part_of_speech: "#/components/schemas/_types.analysis.KuromojiPartOfSpeechTokenFilter"
          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"
          phonetic: "#/components/schemas/_types.analysis.PhoneticTokenFilter"
          dictionary_decompounder: "#/components/schemas/_types.analysis.DictionaryDecompounderTokenFilter"
      oneOf:
      - "$ref": "#/components/schemas/_types.analysis.ApostropheTokenFilter"
      - "$ref": "#/components/schemas/_types.analysis.ArabicStemTokenFilter"
      - "$ref": "#/components/schemas/_types.analysis.ArabicNormalizationTokenFilter"
      - "$ref": "#/components/schemas/_types.analysis.AsciiFoldingTokenFilter"
      - "$ref": "#/components/schemas/_types.analysis.BengaliNormalizationTokenFilter"
      - "$ref": "#/components/schemas/_types.analysis.BrazilianStemTokenFilter"
      - "$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.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.IcuTransformTokenFilter"
      - "$ref": "#/components/schemas/_types.analysis.PhoneticTokenFilter"
      - "$ref": "#/components/schemas/_types.analysis.DictionaryDecompounderTokenFilter"
    _types.analysis.ApostropheTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - apostrophe
        required:
        - type
    _types.analysis.TokenFilterBase:
      type: object
      properties:
        version:
          allOf:
          - "$ref": "#/components/schemas/_types.VersionString"
    _types.analysis.ArabicStemTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - arabic_stem
        required:
        - type
    _types.analysis.ArabicNormalizationTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - arabic_normalization
        required:
        - type
    _types.analysis.AsciiFoldingTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - asciifolding
          preserve_original:
            description: If `true`, emit both original tokens and folded tokens. Defaults
              to `false`.
            allOf:
            - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean"
        required:
        - type
    _types.analysis.BengaliNormalizationTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - bengali_normalization
        required:
        - type
    _types.analysis.BrazilianStemTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - brazilian_stem
        required:
        - type
    _types.analysis.CjkBigramTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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
        required:
        - type
    _types.analysis.CjkBigramIgnoredScript:
      type: string
      enum:
      - han
      - hangul
      - hiragana
      - katakana
    _types.analysis.CjkWidthTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - cjk_width
        required:
        - type
    _types.analysis.ClassicTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - classic
        required:
        - type
    _types.analysis.CommonGramsTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - common_grams
          common_words:
            description: |-
              A list of tokens. The filter generates bigrams for these tokens.
              Either 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.
              This 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.
              Either 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:
              - Unigrams for common words
              - Unigrams for terms followed by common words
              Defaults to `false`. We recommend enabling this parameter for search analyzers.
            type: boolean
        required:
        - type
    _types.analysis.ConditionTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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:
            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
        - filter
        - script
    _types.analysis.CzechStemTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - czech_stem
        required:
        - type
    _types.analysis.DecimalDigitTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - decimal_digit
        required:
        - type
    _types.analysis.DelimitedPayloadTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - delimited_payload
          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
    _types.analysis.DelimitedPayloadEncoding:
      type: string
      enum:
      - int
      - float
      - identity
    _types.analysis.DutchStemTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - dutch_stem
        required:
        - type
    _types.analysis.EdgeNGramTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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:
            description: Indicates whether to truncate tokens from the `front` or
              `back`. Defaults to `front`.
            allOf:
            - "$ref": "#/components/schemas/_types.analysis.EdgeNGramSide"
          preserve_original:
            description: Emits original token when set to `true`. Defaults to `false`.
            allOf:
            - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean"
        required:
        - type
    _types.analysis.EdgeNGramSide:
      type: string
      enum:
      - front
      - back
    _types.analysis.ElisionTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - elision
          articles:
            description: |-
              List of elisions to remove.
              To 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.
              For 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.
              This 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.
              To 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.
              For custom `elision` filters, either this parameter or `articles` must be specified.
            type: string
          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
    _types.analysis.FingerprintTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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
        required:
        - type
    _types.analysis.FlattenGraphTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - flatten_graph
        required:
        - type
    _types.analysis.FrenchStemTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - french_stem
        required:
        - type
    _types.analysis.GermanNormalizationTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - german_normalization
        required:
        - type
    _types.analysis.GermanStemTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - german_stem
        required:
        - type
    _types.analysis.HindiNormalizationTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - hindi_normalization
        required:
        - type
    _types.analysis.HunspellTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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.
              By default, the `hunspell` filter uses all `.dic` files in the `<$ES_PATH_CONF>/hunspell/<locale>` 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
        required:
        - type
        - locale
    _types.analysis.HyphenationDecompounderTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.CompoundWordTokenFilterBase"
      - 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.
              This 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
        - hyphenation_patterns_path
    _types.analysis.CompoundWordTokenFilterBase:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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.
              Either 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.
              This 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.
              Either this parameter or `word_list` must be specified.
            type: string
    _types.analysis.IndicNormalizationTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - indic_normalization
        required:
        - type
    _types.analysis.KeepTypesTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - keep_types
          mode:
            description: Indicates whether to keep or remove the specified token types.
            allOf:
            - "$ref": "#/components/schemas/_types.analysis.KeepTypesMode"
          types:
            description: List of token types to keep or remove.
            type: array
            items:
              type: string
        required:
        - type
        - types
    _types.analysis.KeepTypesMode:
      type: string
      enum:
      - include
      - exclude
    _types.analysis.KeepWordsTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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.
              Either 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.
              This 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.
              Either this parameter or `keep_words` must be specified.
            type: string
        required:
        - type
    _types.analysis.KeywordMarkerTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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.
              This 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.
              This 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.
              This 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.
              This parameter, `keywords`, or `keywords_path` must be specified. You cannot specify this parameter and `keywords` or `keywords_pattern`.
            type: string
        required:
        - type
    _types.analysis.KeywordRepeatTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - keyword_repeat
        required:
        - type
    _types.analysis.KStemTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - kstem
        required:
        - type
    _types.analysis.LengthTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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
        required:
        - type
    _types.analysis.LimitTokenCountTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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:
            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"
        required:
        - type
    _types.analysis.LowercaseTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - lowercase
          language:
            description: Language-specific lowercase token filter to use.
            allOf:
            - "$ref": "#/components/schemas/_types.analysis.LowercaseTokenFilterLanguages"
        required:
        - type
    _types.analysis.LowercaseTokenFilterLanguages:
      type: string
      enum:
      - greek
      - irish
      - turkish
    _types.analysis.MinHashTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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`.
              Hashes 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:
        - type
    _types.analysis.MultiplexerTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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:
            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
        - filters
    _types.analysis.NGramTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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:
            description: Emits original token when set to `true`. Defaults to `false`.
            allOf:
            - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean"
        required:
        - type
    _types.analysis.NoriPartOfSpeechTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - nori_part_of_speech
          stoptags:
            description: An array of part-of-speech tags that should be removed.
            type: array
            items:
              type: string
        required:
        - type
    _types.analysis.PatternCaptureTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - pattern_capture
          patterns:
            description: A list of regular expressions to match.
            type: array
            items:
              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
    _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
    _types.analysis.PersianNormalizationTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - persian_normalization
        required:
        - type
    _types.analysis.PersianStemTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - persian_stem
        required:
        - type
    _types.analysis.PorterStemTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - porter_stem
        required:
        - type
    _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
    _types.analysis.RemoveDuplicatesTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - remove_duplicates
        required:
        - type
    _types.analysis.ReverseTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - reverse
        required:
        - type
    _types.analysis.RussianStemTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - russian_stem
        required:
        - type
    _types.analysis.ScandinavianFoldingTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - scandinavian_folding
        required:
        - type
    _types.analysis.ScandinavianNormalizationTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - scandinavian_normalization
        required:
        - type
    _types.analysis.SerbianNormalizationTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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
    _types.analysis.SnowballTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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
    _types.analysis.SoraniNormalizationTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - sorani_normalization
        required:
        - type
    _types.analysis.StemmerOverrideTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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
    _types.analysis.StemmerTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - stemmer
          language:
            type: string
        required:
        - type
    _types.analysis.StopTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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.
              This 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
        required:
        - type
    _types.analysis.SynonymTokenFilterBase:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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
    _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
        required:
        - type
    _types.analysis.TrimTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - trim
        required:
        - type
    _types.analysis.TruncateTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        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"
      - type: object
        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"
      - type: object
        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
    _types.analysis.WordDelimiterTokenFilterBase:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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.
              This 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
    _types.analysis.WordDelimiterTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.WordDelimiterTokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - word_delimiter
        required:
        - type
    _types.analysis.JaStopTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - ja_stop
          stopwords:
            allOf:
            - "$ref": "#/components/schemas/_types.analysis.StopWords"
        required:
        - type
    _types.analysis.KuromojiStemmerTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - kuromoji_stemmer
          minimum_length:
            type: number
        required:
        - type
        - minimum_length
    _types.analysis.KuromojiReadingFormTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - kuromoji_readingform
          use_romaji:
            type: boolean
        required:
        - type
        - use_romaji
    _types.analysis.KuromojiPartOfSpeechTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - kuromoji_part_of_speech
          stoptags:
            type: array
            items:
              type: string
        required:
        - type
        - stoptags
    _types.analysis.IcuCollationTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - 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
    _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:
      type: string
      enum:
      - primary
      - secondary
      - tertiary
      - quaternary
      - identical
    _types.analysis.IcuFoldingTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - icu_folding
          unicode_set_filter:
            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:
            allOf:
            - "$ref": "#/components/schemas/_types.analysis.IcuNormalizationType"
        required:
        - type
        - name
    _types.analysis.IcuTransformTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - icu_transform
          dir:
            allOf:
            - "$ref": "#/components/schemas/_types.analysis.IcuTransformDirection"
          id:
            type: string
        required:
        - type
        - id
    _types.analysis.IcuTransformDirection:
      type: string
      enum:
      - forward
      - reverse
    _types.analysis.PhoneticTokenFilter:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenFilterBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - phonetic
          encoder:
            allOf:
            - "$ref": "#/components/schemas/_types.analysis.PhoneticEncoder"
          languageset:
            description: |2+


              Supported values include: `any`, `common`, `cyrillic`, `english`, `french`, `german`, `hebrew`, `hungarian`, `polish`, `romanian`, `russian`, `spanish`

            oneOf:
            - "$ref": "#/components/schemas/_types.analysis.PhoneticLanguage"
            - type: array
              items:
                "$ref": "#/components/schemas/_types.analysis.PhoneticLanguage"
          max_code_len:
            type: number
          name_type:
            allOf:
            - "$ref": "#/components/schemas/_types.analysis.PhoneticNameType"
          replace:
            type: boolean
          rule_type:
            allOf:
            - "$ref": "#/components/schemas/_types.analysis.PhoneticRuleType"
        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:
          type:
            type: string
            enum:
            - dictionary_decompounder
        required:
        - type
    _types.analysis.Normalizer:
      discriminator:
        propertyName: type
        mapping:
          lowercase: "#/components/schemas/_types.analysis.LowercaseNormalizer"
          custom: "#/components/schemas/_types.analysis.CustomNormalizer"
      oneOf:
      - "$ref": "#/components/schemas/_types.analysis.LowercaseNormalizer"
      - "$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
        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
      x-model: true
    _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"
          keyword: "#/components/schemas/_types.analysis.KeywordTokenizer"
          letter: "#/components/schemas/_types.analysis.LetterTokenizer"
          lowercase: "#/components/schemas/_types.analysis.LowercaseTokenizer"
          ngram: "#/components/schemas/_types.analysis.NGramTokenizer"
          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"
          icu_tokenizer: "#/components/schemas/_types.analysis.IcuTokenizer"
          kuromoji_tokenizer: "#/components/schemas/_types.analysis.KuromojiTokenizer"
          nori_tokenizer: "#/components/schemas/_types.analysis.NoriTokenizer"
      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:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - char_group
          tokenize_on_chars:
            type: array
            items:
              type: string
          max_token_length:
            type: number
        required:
        - type
        - tokenize_on_chars
    _types.analysis.TokenizerBase:
      type: object
      properties:
        version:
          allOf:
          - "$ref": "#/components/schemas/_types.VersionString"
    _types.analysis.ClassicTokenizer:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - classic
          max_token_length:
            type: number
        required:
        - type
    _types.analysis.EdgeNGramTokenizer:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - edge_ngram
          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.analysis.TokenChar:
      type: string
      enum:
      - letter
      - digit
      - whitespace
      - punctuation
      - symbol
      - custom
    _types.analysis.KeywordTokenizer:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - keyword
          buffer_size:
            default: 256
            type: number
        required:
        - type
    _types.analysis.LetterTokenizer:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - letter
        required:
        - type
    _types.analysis.LowercaseTokenizer:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - lowercase
        required:
        - type
    _types.analysis.NGramTokenizer:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - ngram
          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.analysis.PathHierarchyTokenizer:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - path_hierarchy
          buffer_size:
            allOf:
            - "$ref": "#/components/schemas/_spec_utils.Stringifiedinteger"
          delimiter:
            type: string
          replacement:
            type: string
          reverse:
            allOf:
            - "$ref": "#/components/schemas/_spec_utils.Stringifiedboolean"
          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
          group:
            type: number
          pattern:
            type: string
        required:
        - type
    _types.analysis.SimplePatternTokenizer:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - simple_pattern
          pattern:
            type: string
        required:
        - type
    _types.analysis.SimplePatternSplitTokenizer:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - simple_pattern_split
          pattern:
            type: string
        required:
        - type
    _types.analysis.StandardTokenizer:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - standard
          max_token_length:
            type: number
        required:
        - type
    _types.analysis.ThaiTokenizer:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - thai
        required:
        - type
    _types.analysis.UaxEmailUrlTokenizer:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - uax_url_email
          max_token_length:
            type: number
        required:
        - type
    _types.analysis.WhitespaceTokenizer:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - whitespace
          max_token_length:
            type: number
        required:
        - type
    _types.analysis.IcuTokenizer:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - icu_tokenizer
          rule_files:
            type: string
        required:
        - type
        - rule_files
    _types.analysis.KuromojiTokenizer:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - kuromoji_tokenizer
          discard_punctuation:
            type: boolean
          mode:
            allOf:
            - "$ref": "#/components/schemas/_types.analysis.KuromojiTokenizationMode"
          nbest_cost:
            type: number
          nbest_examples:
            type: string
          user_dictionary:
            type: string
          user_dictionary_rules:
            type: array
            items:
              type: string
          discard_compound_token:
            type: boolean
        required:
        - type
        - mode
    _types.analysis.NoriTokenizer:
      allOf:
      - "$ref": "#/components/schemas/_types.analysis.TokenizerBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - nori_tokenizer
          decompound_mode:
            allOf:
            - "$ref": "#/components/schemas/_types.analysis.NoriDecompoundMode"
          discard_punctuation:
            type: boolean
          user_dictionary:
            type: string
          user_dictionary_rules:
            type: array
            items:
              type: string
        required:
        - type
    indices._types.IndexSettingsTimeSeries:
      type: object
      properties:
        end_time:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        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"
          boolean: "#/components/schemas/indices._types.SettingsSimilarityBoolean"
          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"
          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
        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:
          allOf:
          - "$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:
          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"
        weight_script:
          allOf:
          - "$ref": "#/components/schemas/_types.Script"
      required:
      - type
      - script
    indices._types.MappingLimitSettings:
      description: Mapping Limit Settings
      type: object
      properties:
        coerce:
          type: boolean
        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
          - 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.
            The limit is in place to prevent mappings and searches from becoming too large. Higher values can lead to performance
            degradations and memory issues, especially in clusters with a high load or few resources.
          default: '1000'
          oneOf:
          - type: number
          - 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
            to false (the default), the index request of the document that tries to add a dynamic field to the mapping will fail
            with the message Limit of total fields [X] has been exceeded. When set to true, the index request will not fail.
            Instead, fields that would exceed the limit are not added to the mapping, similar to dynamic: false.
            The fields that were not added to the mapping will be added to the _ignored field.
          default: 'false'
          oneOf:
          - type: boolean
          - type: string
    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
            at the root object level, then the depth is 1. If there is one object mapping, then the depth is 2, etc.
          default: 20
          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
            arrays of objects need to be queried independently of each other. To safeguard against poorly designed mappings, this
            setting limits the number of unique nested types per index.
          default: 50
          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
            to prevent out of memory errors when a document contains too many nested objects.
          default: 10000
          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
            might still be useful if you want to limit the field length. It usually shouldn’t be necessary to set this setting. The
            default 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.
            Elastic 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:
      - mode
    indices._types.SourceMode:
      type: string
      enum:
      - disabled
      - stored
      - synthetic
    indices._types.IndexingSlowlogSettings:
      type: object
      properties:
        level:
          type: string
        source:
          type: number
        reformat:
          type: boolean
        threshold:
          allOf:
          - "$ref": "#/components/schemas/indices._types.IndexingSlowlogTresholds"
    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`.
            Log and the thresholds are configured in the same way as the search slowlog.
          allOf:
          - "$ref": "#/components/schemas/indices._types.SlowlogTresholdLevels"
    indices._types.IndexingPressure:
      type: object
      properties:
        memory:
          allOf:
          - "$ref": "#/components/schemas/indices._types.IndexingPressureMemory"
      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,
            the node will reject new coordinating and primary operations. When replica operations consume 1.5x this limit,
            the node will reject new replica operations. Defaults to 10% of the heap.
          type: number
    indices._types.Storage:
      type: object
      properties:
        type:
          description: |2+


            Supported values include:
              - `fs`: Default file system implementation. This will pick the best implementation depending on the operating environment, which
            is currently hybridfs on all supported systems but is subject to change.
              - `niofs`: The NIO FS type stores the shard index on the file system (maps to Lucene NIOFSDirectory) using NIO. It allows multiple
            threads to read from the same file concurrently. It is not recommended on Windows because of a bug in the SUN Java
            implementation and disables some optimizations for heap memory usage.
              - `mmapfs`: The MMap FS type stores the shard index on the file system (maps to Lucene MMapDirectory) by mapping a file into
            memory (mmap). Memory mapping uses up a portion of the virtual memory address space in your process equal to the size
            of the file being mapped. Before using this class, be sure you have allowed plenty of virtual address space.
              - `hybridfs`: The hybridfs type is a hybrid of niofs and mmapfs, which chooses the best file system type for each type of file
            based on the read access pattern. Currently only the Lucene term dictionary, norms and doc values files are memory
            mapped. All other files are opened using Lucene NIOFSDirectory. Similarly to mmapfs be sure you have allowed
            plenty of virtual address space.

          allOf:
          - "$ref": "#/components/schemas/indices._types.StorageType"
        allow_mmap:
          description: |-
            You can restrict the use of the mmapfs and the related hybridfs store type via the setting node.store.allow_mmap.
            This is a boolean setting indicating whether or not memory-mapping is allowed. The default is to allow it. This
            setting is useful, for example, if you are in an environment where you can not control the ability to create a lot
            of 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
    indices._types.StorageType:
      anyOf:
      - type: string
        enum:
        - fs
        - niofs
        - mmapfs
        - hybridfs
      - type: string
    _types.mapping.TypeMapping:
      type: object
      properties:
        all_field:
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.AllField"
        date_detection:
          type: boolean
        dynamic:
          allOf:
          - "$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:
          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
        properties:
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/_types.mapping.Property"
        _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/_types.mapping.RuntimeField"
        enabled:
          type: boolean
        subobjects:
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.Subobjects"
        _data_stream_timestamp:
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.DataStreamTimestamp"
    _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
        store_term_vectors:
          type: boolean
      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:
      type: string
      enum:
      - strict
      - runtime
      - 'true'
      - 'false'
    _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"
      - type: object
        properties:
          mapping:
            allOf:
            - "$ref": "#/components/schemas/_types.mapping.Property"
          runtime:
            allOf:
            - "$ref": "#/components/schemas/_types.mapping.RuntimeField"
        minProperties: 1
        maxProperties: 1
    _types.mapping.Property:
      discriminator:
        propertyName: type
        mapping:
          binary: "#/components/schemas/_types.mapping.BinaryProperty"
          boolean: "#/components/schemas/_types.mapping.BooleanProperty"
          "{dynamic_type}": "#/components/schemas/_types.mapping.DynamicProperty"
          join: "#/components/schemas/_types.mapping.JoinProperty"
          keyword: "#/components/schemas/_types.mapping.KeywordProperty"
          match_only_text: "#/components/schemas/_types.mapping.MatchOnlyTextProperty"
          percolator: "#/components/schemas/_types.mapping.PercolatorProperty"
          rank_feature: "#/components/schemas/_types.mapping.RankFeatureProperty"
          rank_features: "#/components/schemas/_types.mapping.RankFeaturesProperty"
          search_as_you_type: "#/components/schemas/_types.mapping.SearchAsYouTypeProperty"
          text: "#/components/schemas/_types.mapping.TextProperty"
          version: "#/components/schemas/_types.mapping.VersionProperty"
          wildcard: "#/components/schemas/_types.mapping.WildcardProperty"
          date_nanos: "#/components/schemas/_types.mapping.DateNanosProperty"
          date: "#/components/schemas/_types.mapping.DateProperty"
          aggregate_metric_double: "#/components/schemas/_types.mapping.AggregateMetricDoubleProperty"
          dense_vector: "#/components/schemas/_types.mapping.DenseVectorProperty"
          flattened: "#/components/schemas/_types.mapping.FlattenedProperty"
          nested: "#/components/schemas/_types.mapping.NestedProperty"
          object: "#/components/schemas/_types.mapping.ObjectProperty"
          passthrough: "#/components/schemas/_types.mapping.PassthroughObjectProperty"
          rank_vectors: "#/components/schemas/_types.mapping.RankVectorProperty"
          semantic_text: "#/components/schemas/_types.mapping.SemanticTextProperty"
          sparse_vector: "#/components/schemas/_types.mapping.SparseVectorProperty"
          completion: "#/components/schemas/_types.mapping.CompletionProperty"
          constant_keyword: "#/components/schemas/_types.mapping.ConstantKeywordProperty"
          counted_keyword: "#/components/schemas/_types.mapping.CountedKeywordProperty"
          alias: "#/components/schemas/_types.mapping.FieldAliasProperty"
          histogram: "#/components/schemas/_types.mapping.HistogramProperty"
          exponential_histogram: "#/components/schemas/_types.mapping.ExponentialHistogramProperty"
          ip: "#/components/schemas/_types.mapping.IpProperty"
          murmur3: "#/components/schemas/_types.mapping.Murmur3HashProperty"
          token_count: "#/components/schemas/_types.mapping.TokenCountProperty"
          geo_point: "#/components/schemas/_types.mapping.GeoPointProperty"
          geo_shape: "#/components/schemas/_types.mapping.GeoShapeProperty"
          point: "#/components/schemas/_types.mapping.PointProperty"
          shape: "#/components/schemas/_types.mapping.ShapeProperty"
          byte: "#/components/schemas/_types.mapping.ByteNumberProperty"
          double: "#/components/schemas/_types.mapping.DoubleNumberProperty"
          float: "#/components/schemas/_types.mapping.FloatNumberProperty"
          half_float: "#/components/schemas/_types.mapping.HalfFloatNumberProperty"
          integer: "#/components/schemas/_types.mapping.IntegerNumberProperty"
          long: "#/components/schemas/_types.mapping.LongNumberProperty"
          scaled_float: "#/components/schemas/_types.mapping.ScaledFloatNumberProperty"
          short: "#/components/schemas/_types.mapping.ShortNumberProperty"
          unsigned_long: "#/components/schemas/_types.mapping.UnsignedLongNumberProperty"
          date_range: "#/components/schemas/_types.mapping.DateRangeProperty"
          double_range: "#/components/schemas/_types.mapping.DoubleRangeProperty"
          float_range: "#/components/schemas/_types.mapping.FloatRangeProperty"
          integer_range: "#/components/schemas/_types.mapping.IntegerRangeProperty"
          ip_range: "#/components/schemas/_types.mapping.IpRangeProperty"
          long_range: "#/components/schemas/_types.mapping.LongRangeProperty"
          icu_collation_keyword: "#/components/schemas/_types.mapping.IcuCollationProperty"
      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.RankVectorProperty"
      - "$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.ExponentialHistogramProperty"
      - "$ref": "#/components/schemas/_types.mapping.IpProperty"
      - "$ref": "#/components/schemas/_types.mapping.Murmur3HashProperty"
      - "$ref": "#/components/schemas/_types.mapping.TokenCountProperty"
      - "$ref": "#/components/schemas/_types.mapping.GeoPointProperty"
      - "$ref": "#/components/schemas/_types.mapping.GeoShapeProperty"
      - "$ref": "#/components/schemas/_types.mapping.PointProperty"
      - "$ref": "#/components/schemas/_types.mapping.ShapeProperty"
      - "$ref": "#/components/schemas/_types.mapping.ByteNumberProperty"
      - "$ref": "#/components/schemas/_types.mapping.DoubleNumberProperty"
      - "$ref": "#/components/schemas/_types.mapping.FloatNumberProperty"
      - "$ref": "#/components/schemas/_types.mapping.HalfFloatNumberProperty"
      - "$ref": "#/components/schemas/_types.mapping.IntegerNumberProperty"
      - "$ref": "#/components/schemas/_types.mapping.LongNumberProperty"
      - "$ref": "#/components/schemas/_types.mapping.ScaledFloatNumberProperty"
      - "$ref": "#/components/schemas/_types.mapping.ShortNumberProperty"
      - "$ref": "#/components/schemas/_types.mapping.UnsignedLongNumberProperty"
      - "$ref": "#/components/schemas/_types.mapping.DateRangeProperty"
      - "$ref": "#/components/schemas/_types.mapping.DoubleRangeProperty"
      - "$ref": "#/components/schemas/_types.mapping.FloatRangeProperty"
      - "$ref": "#/components/schemas/_types.mapping.IntegerRangeProperty"
      - "$ref": "#/components/schemas/_types.mapping.IpRangeProperty"
      - "$ref": "#/components/schemas/_types.mapping.LongRangeProperty"
      - "$ref": "#/components/schemas/_types.mapping.IcuCollationProperty"
    _types.mapping.BinaryProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - binary
        required:
        - type
    _types.mapping.DocValuesPropertyBase:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.CorePropertyBase"
      - type: object
        properties:
          doc_values:
            type: boolean
    _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:
        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:
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.DynamicMapping"
        fields:
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/_types.mapping.Property"
        synthetic_source_keep:
          description: |2+


            Supported values include:
              - `none`: Synthetic source diverges from the original source (default)
              - `arrays`: Arrays of the corresponding field or object preserve the original element ordering and duplicate elements.
            The synthetic source fragment for such arrays is not guaranteed to match the original source exactly,
            e.g. array [1, 2, [5], [[4, [3]]], 5] may appear as-is or in an equivalent format like [1, 2, 5, 4, 3, 5].
            The exact format may change in the future, in an effort to reduce the storage overhead of this option.
              - `all`: The source for both singleton instances and arrays of the corresponding field or object gets recorded.
            When applied to objects, the source of all sub-objects and sub-fields gets captured.
            Furthermore, the original source of arrays gets captured and appears in synthetic source with no modifications.

          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"
      - 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
    indices._types.NumericFielddata:
      type: object
      properties:
        format:
          allOf:
          - "$ref": "#/components/schemas/indices._types.NumericFielddataFormat"
      required:
      - format
    indices._types.NumericFielddataFormat:
      type: string
      enum:
      - array
      - disabled
    _types.mapping.OnScriptError:
      type: string
      enum:
      - fail
      - continue
    _types.mapping.DynamicProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase"
      - 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
    _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
        min_chars:
          type: number
      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:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.PropertyBase"
      - 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
    _types.mapping.KeywordProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase"
      - 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
    _types.mapping.MatchOnlyTextProperty:
      description: |-
        A variant of text that trades scoring and efficiency of positional queries for space efficiency. This field
        effectively stores data the same way as a text field that only indexes documents (index_options: docs) and
        disables norms (norms: false). Term queries perform as fast if not faster as on text fields, however queries
        that need positions such as the match_phrase query perform slower as they need to look at the _source document
        to verify whether a phrase matches. All queries return constant scores that are equal to 1.0.
      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
            field 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:
          description: |-
            Allows you to copy the values of multiple fields into a group
            field, which can then be queried as a single field.
          allOf:
          - "$ref": "#/components/schemas/_types.Fields"
      required:
      - type
    _types.mapping.PercolatorProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.PropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - percolator
        required:
        - type
    _types.mapping.RankFeatureProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.PropertyBase"
      - type: object
        properties:
          positive_score_impact:
            type: boolean
          type:
            type: string
            enum:
            - rank_feature
        required:
        - type
    _types.mapping.RankFeaturesProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.PropertyBase"
      - type: object
        properties:
          positive_score_impact:
            type: boolean
          type:
            type: string
            enum:
            - rank_features
        required:
        - type
    _types.mapping.SearchAsYouTypeProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.CorePropertyBase"
      - type: object
        properties:
          analyzer:
            type: string
          index:
            type: boolean
          index_options:
            allOf:
            - "$ref": "#/components/schemas/_types.mapping.IndexOptions"
          max_shingle_size:
            type: number
          norms:
            type: boolean
          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:
            - search_as_you_type
        required:
        - type
    _types.mapping.TextProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.CorePropertyBase"
      - 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
    indices._types.FielddataFrequencyFilter:
      type: object
      properties:
        max:
          type: number
        min:
          type: number
        min_segment_size:
          type: number
      required:
      - max
      - min
      - min_segment_size
    _types.mapping.VersionProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - version
        required:
        - type
    _types.mapping.WildcardProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - wildcard
          null_value:
            x-state: Generally available
            type: string
        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:
            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
    _types.mapping.DateProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase"
      - 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
    _types.mapping.AggregateMetricDoubleProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.PropertyBase"
      - 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
    _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
              the 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`.

              Supported values include:
                - `bit`: Indexes a single bit per dimension. Useful for very high-dimensional vectors or models that specifically support
              bit vectors.

              NOTE: when using `bit`, the number of dimensions must be a multiple of `8` and must represent the number of bits.
                - `byte`: Indexes a 1-byte integer value per dimension.
                - `float`: Indexes a 4-byte floating-point value per dimension.

            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
              that influence how the data structure is built. These can be adjusted to improve the accuracy of results, at the
              expense of slower indexing speed.

              This 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.

              Documents are ranked by their vector field's similarity to the query vector. The `_score` of each document will
              be derived from the similarity, in a way that ensures scores are positive and that a larger score corresponds
              to a higher ranking.

              Defaults to `l2_norm` when `element_type` is `bit` otherwise defaults to `cosine`.

              `bit` vectors only support `l2_norm` as their similarity metric.

              This parameter can only be specified when `index` is `true`.

              Supported values include:
                - `cosine`: Computes the cosine similarity. During indexing Elasticsearch automatically normalizes vectors with `cosine`
              similarity to unit length. This allows to internally use `dot_product` for computing similarity, which is more
              efficient. Original un-normalized vectors can be still accessed through scripts.

              The document `_score` is computed as `(1 + cosine(query, vector)) / 2`.

              The `cosine` similarity does not allow vectors with zero magnitude, since cosine is not defined in this case.
                - `dot_product`: Computes the dot product of two unit vectors. This option provides an optimized way to perform cosine similarity.
              The constraints and computed score are defined by `element_type`.

              When `element_type` is `float`, all vectors must be unit length, including both document and query vectors.

              The document `_score` is computed as `(1 + dot_product(query, vector)) / 2`.

              When `element_type` is `byte`, all vectors must have the same length including both document and query vectors or
              results will be inaccurate.

              The document `_score` is computed as `0.5 + (dot_product(query, vector) / (32768 * dims))` where `dims` is the
              number of dimensions per vector.
                - `l2_norm`: Computes similarity based on the `L2` distance (also known as Euclidean distance) between the vectors.

              The document `_score` is computed as `1 / (1 + l2_norm(query, vector)^2)`.

              For `bit` vectors, instead of using `l2_norm`, the `hamming` distance between the vectors is used.

              The `_score` transformation is `(numBits - hamming(a, b)) / numBits`.
                - `max_inner_product`: Computes the maximum inner product of two vectors. This is similar to `dot_product`, but doesn't require vectors
              to be normalized. This means that each vector’s magnitude can significantly effect the score.

              The document `_score` is adjusted to prevent negative values. For `max_inner_product` values `< 0`, the `_score`
              is `1 / (1 + -1 * max_inner_product(query, vector))`. For non-negative `max_inner_product` results the `_score`
              is calculated `max_inner_product(query, vector) + 1`.

            allOf:
            - "$ref": "#/components/schemas/_types.mapping.DenseVectorSimilarity"
        required:
        - type
    _types.mapping.DenseVectorElementType:
      type: string
      enum:
      - bit
      - byte
      - float
    _types.mapping.DenseVectorIndexOptions:
      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
            `1.0` or exactly `0`. When the value is `0`, this indicates that dynamic quantiles should be calculated for
            optimized quantization. When between `0.90` and `1.0`, this value restricts the values used when calculating
            the quantization thresholds.

            For example, a value of `0.95` will only use the middle `95%` of the values when calculating the quantization
            thresholds (e.g. the highest and lowest `2.5%` of values will be ignored).

            Defaults to `1/(dims + 1)` for `int8` quantized vectors and `0` for `int4` for dynamic quantile calculation.

            Only applicable to `int8_hnsw`, `int4_hnsw`, `int8_flat`, and `int4_flat` index types.
          type: number
        ef_construction:
          description: |-
            The number of candidates to track while assembling the list of nearest neighbors for each new node.

            Only applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw` index types.
          default: 100
          type: number
        m:
          description: |-
            The number of neighbors each node will be connected to in the HNSW graph.

            Only applicable to `hnsw`, `int8_hnsw`, `bbq_hnsw`, and `int4_hnsw` index types.
          default: 16
          type: number
        type:
          description: |+
            The type of kNN algorithm to use.

            Supported values include:
              - `bbq_flat`: This utilizes a brute-force search algorithm in addition to automatically quantizing to binary vectors.
            Only supports `element_type` of `float`.
              - `bbq_hnsw`: This utilizes the HNSW algorithm in addition to automatic binary quantization for scalable approximate kNN
            search with `element_type` of `float`.

            This can reduce the memory footprint by nearly 32x at the cost of some accuracy.
              - `flat`: This utilizes a brute-force search algorithm for exact kNN search. This supports all `element_type` values.
              - `hnsw`: This utilizes the HNSW algorithm for scalable approximate kNN search. This supports all `element_type` values.
              - `int4_flat`: This utilizes a brute-force search algorithm in addition to automatically half-byte scalar quantization.
            Only supports `element_type` of `float`.
              - `int4_hnsw`: This utilizes the HNSW algorithm in addition to automatically scalar quantization for scalable approximate kNN
            search with `element_type` of `float`.

            This can reduce the memory footprint by 8x at the cost of some accuracy.
              - `int8_flat`: This utilizes a brute-force search algorithm in addition to automatically scalar quantization. Only supports
            `element_type` of `float`.
              - `int8_hnsw`: The default index type for `float` vectors. This utilizes the HNSW algorithm in addition to automatically scalar
            quantization for scalable approximate kNN search with `element_type` of `float`.

            This can reduce the memory footprint by 4x at the cost of some accuracy.

          allOf:
          - "$ref": "#/components/schemas/_types.mapping.DenseVectorIndexOptionsType"
        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"
      required:
      - type
    _types.mapping.DenseVectorIndexOptionsType:
      type: string
      enum:
      - bbq_flat
      - bbq_hnsw
      - flat
      - hnsw
      - int4_flat
      - int4_hnsw
      - int8_flat
      - int8_hnsw
    _types.mapping.DenseVectorIndexOptionsRescoreVector:
      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_*`.
            When provided, `oversample * k` vectors will be gathered and then their scores will be re-computed with the original vectors.

            valid values are between `1.0` and `10.0` (inclusive), or `0` exactly to disable oversampling.
          type: number
      required:
      - oversample
    _types.mapping.DenseVectorSimilarity:
      type: string
      enum:
      - cosine
      - dot_product
      - l2_norm
      - max_inner_product
    _types.mapping.FlattenedProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.PropertyBase"
      - 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
    _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
        required:
        - type
    _types.mapping.ObjectProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.CorePropertyBase"
      - type: object
        properties:
          enabled:
            type: boolean
          subobjects:
            allOf:
            - "$ref": "#/components/schemas/_types.mapping.Subobjects"
          type:
            type: string
            enum:
            - object
    _types.mapping.Subobjects:
      type: string
      enum:
      - 'true'
      - 'false'
    _types.mapping.PassthroughObjectProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.CorePropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - passthrough
          enabled:
            type: boolean
          priority:
            type: number
          time_series_dimension:
            type: boolean
    _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
    _types.mapping.RankVectorElementType:
      type: string
      enum:
      - byte
      - float
      - bit
    _types.mapping.SemanticTextProperty:
      type: object
      properties:
        type:
          type: string
          enum:
          - semantic_text
        meta:
          type: object
          additionalProperties:
            type: string
        inference_id:
          description: |-
            Inference endpoint that will be used to generate embeddings for the field.
            This parameter cannot be updated. Use the Create inference API to create the endpoint.
            If `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"
        search_inference_id:
          description: |-
            Inference endpoint that will be used to generate embeddings at query time.
            You can update this parameter by using the Update mapping API. Use the Create inference API to create the endpoint.
            If not specified, the inference endpoint defined by inference_id will be used at both index and query time.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        index_options:
          description: |-
            Settings for index_options that override any defaults used by semantic_text, for example
            specific quantization settings.
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.SemanticTextIndexOptions"
        chunking_settings:
          description: |-
            Settings for chunking text into smaller passages. If specified, these will override the
            chunking settings sent in the inference endpoint associated with inference_id. If chunking settings are updated,
            they will not be applied to existing documents until they are reindexed.
          oneOf:
          - "$ref": "#/components/schemas/_types.mapping.ChunkingSettings"
          - nullable: true
            type: string
        fields:
          description: |-
            Multi-fields allow the same string value to be indexed in multiple ways for different purposes, such as one
            field 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:
      - type
    _types.mapping.SemanticTextIndexOptions:
      type: object
      properties:
        dense_vector:
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.DenseVectorIndexOptions"
        sparse_vector:
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.SparseVectorIndexOptions"
    _types.mapping.SparseVectorIndexOptions:
      type: object
      properties:
        prune:
          description: |-
            Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance.
            If prune is true but the pruning_config is not specified, pruning will occur but default values will be used.
            Default: false
          x-state: Generally available
          type: boolean
        pruning_config:
          description: |-
            Optional pruning configuration.
            If enabled, this will omit non-significant tokens from the query in order to improve query performance.
            This is only used if prune is set to true.
            If prune is set to true but pruning_config is not specified, default values will be used.
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/_types.TokenPruningConfig"
    _types.mapping.ChunkingSettings:
      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`.

             * If `strategy` is set to `recursive`, you must also specify:

            - `max_chunk_size`
            - either `separators` or`separator_group`

            Learn 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.

            Sets a predefined list of separators in the saved chunking settings based on the selected text type.
            Values can be `markdown` or `plaintext`.

            Using 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.

            A list of strings used as possible split points when chunking text.

            Each string can be a plain string or a regular expression (regex) pattern.
            The system tries each separator in order to split the text, starting from the first item in the list.

            After splitting, it attempts to recombine smaller pieces into larger chunks that stay within
            the `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.
            This value cannot be lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).
            This value should not exceed the window size for the associated model.
          default: 250
          type: number
        overlap:
          description: |-
            The number of overlapping words for chunks.
            It is applicable only to a `word` chunking strategy.
            This value cannot be higher than half the `max_chunk_size` value.
          default: 100
          type: number
        sentence_overlap:
          description: |-
            The number of overlapping sentences for chunks.
            It is applicable only for a `sentence` chunking strategy.
            It can be either `1` or `0`.
          default: 1
          type: number
      required:
      - strategy
      - max_chunk_size
    _types.mapping.SparseVectorProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.PropertyBase"
      - 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
              token pruning behavior of the sparse vector field.
            x-state: Generally available
            allOf:
            - "$ref": "#/components/schemas/_types.mapping.SparseVectorIndexOptions"
        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
        required:
        - type
    _types.mapping.SuggestContext:
      type: object
      properties:
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
        path:
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
        type:
          type: string
        precision:
          oneOf:
          - type: number
          - type: string
      required:
      - name
      - type
    _types.mapping.ConstantKeywordProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.PropertyBase"
      - type: object
        properties:
          value:
            type: object
          type:
            type: string
            enum:
            - constant_keyword
        required:
        - type
    _types.mapping.CountedKeywordProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.PropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - counted_keyword
          index:
            type: boolean
        required:
        - type
    _types.mapping.FieldAliasProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.PropertyBase"
      - 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"
      - type: object
        properties:
          ignore_malformed:
            type: boolean
          time_series_metric:
            allOf:
            - "$ref": "#/components/schemas/_types.mapping.TimeSeriesMetricType"
          type:
            type: string
            enum:
            - histogram
        required:
        - type
    _types.mapping.ExponentialHistogramProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.PropertyBase"
      - type: object
        properties:
          time_series_metric:
            allOf:
            - "$ref": "#/components/schemas/_types.mapping.TimeSeriesMetricType"
          type:
            type: string
            enum:
            - exponential_histogram
        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:
            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
    _types.mapping.Murmur3HashProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - murmur3
        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
        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:
            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
    _types.mapping.GeoPointMetricType:
      type: string
      enum:
      - gauge
      - counter
      - position
    _types.mapping.GeoShapeProperty:
      description: |-
        The `geo_shape` data type facilitates the indexing of and searching with arbitrary geo shapes such as rectangles
        and polygons.
      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:
            allOf:
            - "$ref": "#/components/schemas/_types.mapping.GeoOrientation"
          strategy:
            allOf:
            - "$ref": "#/components/schemas/_types.mapping.GeoStrategy"
          type:
            type: string
            enum:
            - geo_shape
        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
        required:
        - type
    _types.mapping.ShapeProperty:
      description: |-
        The `shape` data type facilitates the indexing of and searching with arbitrary `x, y` cartesian shapes such as
        rectangles and polygons.
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase"
      - type: object
        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"
      - type: object
        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"
      - type: object
        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
    _types.mapping.DoubleNumberProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - double
          null_value:
            type: number
        required:
        - type
    _types.mapping.FloatNumberProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - float
          null_value:
            type: number
        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
        required:
        - type
    _types.mapping.IntegerNumberProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - integer
          null_value:
            type: number
        required:
        - type
    _types.mapping.LongNumberProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - long
          null_value:
            type: number
        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
        required:
        - type
    _types.mapping.ShortNumberProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - short
          null_value:
            allOf:
            - "$ref": "#/components/schemas/_types.short"
        required:
        - type
    _types.short:
      type: number
    _types.mapping.UnsignedLongNumberProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.NumberPropertyBase"
      - 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"
      - type: object
        properties:
          format:
            type: string
          type:
            type: string
            enum:
            - date_range
        required:
        - type
    _types.mapping.RangePropertyBase:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase"
      - type: object
        properties:
          boost:
            type: number
          coerce:
            type: boolean
          index:
            type: boolean
    _types.mapping.DoubleRangeProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.RangePropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - double_range
        required:
        - type
    _types.mapping.FloatRangeProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.RangePropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - float_range
        required:
        - type
    _types.mapping.IntegerRangeProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.RangePropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - integer_range
        required:
        - type
    _types.mapping.IpRangeProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.RangePropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - ip_range
        required:
        - type
    _types.mapping.LongRangeProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.RangePropertyBase"
      - type: object
        properties:
          type:
            type: string
            enum:
            - long_range
        required:
        - type
    _types.mapping.IcuCollationProperty:
      allOf:
      - "$ref": "#/components/schemas/_types.mapping.DocValuesPropertyBase"
      - 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
    _types.mapping.MatchType:
      type: string
      enum:
      - simple
      - regex
    _types.mapping.FieldNamesField:
      type: object
      properties:
        enabled:
          type: boolean
      required:
      - enabled
    _types.mapping.IndexField:
      type: object
      properties:
        enabled:
          type: boolean
      required:
      - enabled
    _types.mapping.RoutingField:
      type: object
      properties:
        required:
          type: boolean
      required:
      - required
    _types.mapping.SizeField:
      type: object
      properties:
        enabled:
          type: boolean
      required:
      - enabled
    _types.mapping.SourceField:
      type: object
      properties:
        compress:
          type: boolean
        compress_threshold:
          type: string
        enabled:
          type: boolean
        excludes:
          type: array
          items:
            type: string
        includes:
          type: array
          items:
            type: string
        mode:
          description: |2+


            Supported values include:
              - `disabled`
              - `stored`
              - `synthetic`: Instead of storing source documents on disk exactly as you send them,
             Elasticsearch can reconstruct source content on the fly upon retrieval.

          allOf:
          - "$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
    indices._types.AliasDefinition:
      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.
            If specified, this overwrites the `routing` value for indexing operations.
          type: string
        is_write_index:
          description: If `true`, the index is the write index for the alias.
          default: false
          type: boolean
        routing:
          description: Value used to route indexing and search operations to a specific
            shard.
          type: string
        search_routing:
          description: |-
            Value used to route search operations to a specific shard.
            If specified, this overwrites the `routing` value for search operations.
          type: string
        is_hidden:
          description: |-
            If `true`, the alias is hidden.
            All indices for the alias must have the same `is_hidden` value.
          default: false
          x-state: Generally available
          type: boolean
    indices._types.DataStreamLifecycleWithRollover:
      description: |-
        Data stream lifecycle with rollover can be used to display the configuration including the default rollover conditions,
        if asked.
      allOf:
      - "$ref": "#/components/schemas/indices._types.DataStreamLifecycle"
      - 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`.
              This property is an implementation detail and it will only be retrieved when the query param `include_defaults` is set to true.
              The contents of this field are subject to change.
            allOf:
            - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleRolloverConditions"
    indices._types.DataStreamLifecycleRolloverConditions:
      type: object
      properties:
        min_age:
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        max_age:
          type: string
        min_docs:
          type: number
        max_docs:
          type: number
        min_size:
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        max_size:
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        min_primary_shard_size:
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        max_primary_shard_size:
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        min_primary_shard_docs:
          type: number
        max_primary_shard_docs:
          type: number
    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:
        data_retention:
          description: |-
            If defined, every document added to this data stream will be stored at least for this time frame.
            Any time after this duration the document could be deleted.
            When 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/indices._types.DownsamplingRound"
        downsampling_method:
          description: |-
            The method used to downsample the data. There are two options `aggregate` and `last_value`. It requires
            `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
            that's disabled (enabled: `false`) will have no effect on the data stream.
          default: true
          type: boolean
    indices._types.DownsamplingRound:
      type: object
      properties:
        after:
          description: The duration since rollover when this downsampling round should
            execute
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        fixed_interval:
          description: The downsample interval.
          allOf:
          - "$ref": "#/components/schemas/_types.DurationLarge"
      required:
      - after
      - fixed_interval
    indices._types.SamplingMethod:
      type: string
      enum:
      - aggregate
      - last_value
    indices._types.DataStreamOptions:
      description: |-
        Data stream options contain the configuration of data stream level features for a given data stream, for example,
        the failure store configuration.
      type: object
      properties:
        failure_store:
          description: If defined, it specifies configuration for the failure store
            of this data stream.
          allOf:
          - "$ref": "#/components/schemas/indices._types.DataStreamFailureStore"
    indices._types.DataStreamFailureStore:
      description: Data stream failure store contains the configuration of the failure
        store for a given data stream.
      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
            that's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will
            not remove any existing data from the failure store.
          default: true
          type: boolean
        lifecycle:
          description: If defined, it specifies the lifecycle configuration for the
            failure store of this data stream.
          allOf:
          - "$ref": "#/components/schemas/indices._types.FailureStoreLifecycle"
    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.
            Any time after this duration the document could be deleted.
            When 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
            that's disabled (enabled: `false`) will have no effect on the data stream.
          default: true
          type: boolean
    _types.ClusterInfoTargets:
      oneOf:
      - "$ref": "#/components/schemas/_types.ClusterInfoTarget"
      - type: array
        items:
          "$ref": "#/components/schemas/_types.ClusterInfoTarget"
    _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
        clients:
          description: |-
            Information on current and recently-closed HTTP client connections.
            Clients 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"
    nodes._types.Client:
      type: object
      properties:
        id:
          description: Unique ID for the HTTP client.
          type: number
        agent:
          description: |-
            Reported agent for the HTTP client.
            If unavailable, this property is not included in the response.
          type: string
        local_address:
          description: Local address for the HTTP connection.
          type: string
        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.
            If unavailable, this property is not included in the response.
          type: string
    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"
        total:
          description: Contains statistics about ingest operations for the node.
          allOf:
          - "$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
        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
        processors:
          description: Total number of ingest processors.
          type: array
          items:
            type: object
            additionalProperties:
              "$ref": "#/components/schemas/nodes._types.KeyedProcessor"
        time_in_millis:
          description: Total time, in milliseconds, spent preprocessing ingest documents
            during the lifetime of this node.
          allOf:
          - "$ref": "#/components/schemas/_types.DurationValueUnitMillis"
        ingested_as_first_pipeline_in_bytes:
          description: |-
            Total number of bytes of all documents ingested by the pipeline.
            This field is only present on pipelines which are the first to process a document.
            Thus, 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
          type: number
        produced_as_first_pipeline_in_bytes:
          description: |-
            Total number of bytes of all documents produced by the pipeline.
            This field is only present on pipelines which are the first to process a document.
            Thus, 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.
            In situations where there are subsequent pipelines, the value represents the size of the document after all pipelines have run.
          x-state: Generally available
          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:
          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
        current:
          description: Number of documents currently being transformed by the processor.
          type: number
        failed:
          description: Number of failed operations for the processor.
          type: number
        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
        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:
      - count
      - current
      - failed
      - time_in_millis
    nodes._types.ThreadCount:
      type: object
      properties:
        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
        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
        compilations:
          description: Total number of inline script compilations performed by the
            node.
          type: number
        compilations_history:
          description: Contains this recent history of script compilations.
          type: object
          additionalProperties:
            type: number
        compilation_limit_triggered:
          description: Total number of times the script compilation circuit breaker
            has limited inline script compilations.
          type: number
        contexts:
          type: array
          items:
            "$ref": "#/components/schemas/nodes._types.Context"
    nodes._types.Context:
      type: object
      properties:
        context:
          type: string
        compilations:
          type: number
        cache_evictions:
          type: number
        compilation_limit_triggered:
          type: number
    indices.put_index_template.IndexTemplateMapping:
      type: object
      properties:
        aliases:
          description: |-
            Aliases to add.
            If the index template includes a `data_stream` object, these are data stream aliases.
            Otherwise, these are index aliases.
            Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/indices._types.Alias"
        mappings:
          description: |-
            Mapping for fields in the index.
            If 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
          allOf:
          - "$ref": "#/components/schemas/indices._types.DataStreamLifecycle"
        data_stream_options:
          x-state: Generally available
          oneOf:
          - "$ref": "#/components/schemas/indices._types.DataStreamOptionsTemplate"
          - nullable: true
            type: string
    indices._types.Alias:
      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.
            If specified, this overwrites the `routing` value for indexing operations.
          allOf:
          - "$ref": "#/components/schemas/_types.Routing"
        is_hidden:
          description: |-
            If `true`, the alias is hidden.
            All indices for the alias must have the same `is_hidden` value.
          default: false
          type: boolean
        is_write_index:
          description: If `true`, the index is the write index for the alias.
          default: false
          type: boolean
        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.
            If specified, this overwrites the `routing` value for search operations.
          allOf:
          - "$ref": "#/components/schemas/_types.Routing"
    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:
        failure_store:
          oneOf:
          - "$ref": "#/components/schemas/indices._types.DataStreamFailureStoreTemplate"
          - nullable: true
            type: string
    indices._types.DataStreamFailureStoreTemplate:
      description: Template equivalent of DataStreamFailureStore that allows nullable
        values.
      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
            that's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will
            not remove any existing data from the failure store.
          default: 'true'
          oneOf:
          - type: boolean
          - nullable: true
            type: string
        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
    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.
            Any time after this duration the document could be deleted.
            When empty, every document in this data stream will be stored indefinitely.
          oneOf:
          - "$ref": "#/components/schemas/_types.Duration"
          - nullable: true
            type: string
        enabled:
          description: |-
            If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle
            that's disabled (enabled: `false`) will have no effect on the data stream.
          default: true
          type: boolean
    _types.Result:
      type: string
      enum:
      - created
      - updated
      - deleted
      - not_found
      - noop
    connector._types.Connector:
      type: object
      properties:
        api_key_id:
          type: string
        api_key_secret_id:
          type: string
        configuration:
          allOf:
          - "$ref": "#/components/schemas/connector._types.ConnectorConfiguration"
        custom_scheduling:
          allOf:
          - "$ref": "#/components/schemas/connector._types.ConnectorCustomScheduling"
        deleted:
          type: boolean
        description:
          type: string
        error:
          oneOf:
          - type: string
          - nullable: true
            type: string
        features:
          allOf:
          - "$ref": "#/components/schemas/connector._types.ConnectorFeatures"
        filtering:
          type: array
          items:
            "$ref": "#/components/schemas/connector._types.FilteringConfig"
        id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        index_name:
          oneOf:
          - "$ref": "#/components/schemas/_types.IndexName"
          - nullable: true
            type: string
        is_native:
          type: boolean
        language:
          type: string
        last_access_control_sync_error:
          type: string
        last_access_control_sync_scheduled_at:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        last_access_control_sync_status:
          allOf:
          - "$ref": "#/components/schemas/connector._types.SyncStatus"
        last_deleted_document_count:
          type: number
        last_incremental_sync_scheduled_at:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        last_indexed_document_count:
          type: number
        last_seen:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        last_sync_error:
          type: string
        last_sync_scheduled_at:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        last_sync_status:
          allOf:
          - "$ref": "#/components/schemas/connector._types.SyncStatus"
        last_synced:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        name:
          type: string
        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:
      - configuration
      - custom_scheduling
      - deleted
      - filtering
      - is_native
      - scheduling
      - status
      - sync_now
    connector._types.ConnectorConfiguration:
      type: object
      additionalProperties:
        "$ref": "#/components/schemas/connector._types.ConnectorConfigProperties"
    connector._types.ConnectorConfigProperties:
      type: object
      properties:
        category:
          type: string
        default_value:
          allOf:
          - "$ref": "#/components/schemas/_types.ScalarValue"
        depends_on:
          type: array
          items:
            "$ref": "#/components/schemas/connector._types.Dependency"
        display:
          allOf:
          - "$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
        sensitive:
          type: boolean
        tooltip:
          oneOf:
          - type: string
          - nullable: true
            type: string
        type:
          allOf:
          - "$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
      - type: number
      - type: string
      - type: boolean
      - nullable: true
        type: string
    connector._types.Dependency:
      type: object
      properties:
        field:
          type: string
        value:
          allOf:
          - "$ref": "#/components/schemas/_types.ScalarValue"
      required:
      - field
      - value
    connector._types.DisplayType:
      type: string
      enum:
      - textbox
      - textarea
      - numeric
      - toggle
      - dropdown
    connector._types.SelectOption:
      type: object
      properties:
        label:
          type: string
        value:
          allOf:
          - "$ref": "#/components/schemas/_types.ScalarValue"
      required:
      - label
      - value
    connector._types.ConnectorFieldType:
      type: string
      enum:
      - str
      - int
      - list
      - bool
    connector._types.Validation:
      discriminator:
        propertyName: type
        mapping:
          less_than: "#/components/schemas/connector._types.LessThanValidation"
          greater_than: "#/components/schemas/connector._types.GreaterThanValidation"
          list_type: "#/components/schemas/connector._types.ListTypeValidation"
          included_in: "#/components/schemas/connector._types.IncludedInValidation"
          regex: "#/components/schemas/connector._types.RegexValidation"
      oneOf:
      - "$ref": "#/components/schemas/connector._types.LessThanValidation"
      - "$ref": "#/components/schemas/connector._types.GreaterThanValidation"
      - "$ref": "#/components/schemas/connector._types.ListTypeValidation"
      - "$ref": "#/components/schemas/connector._types.IncludedInValidation"
      - "$ref": "#/components/schemas/connector._types.RegexValidation"
    connector._types.LessThanValidation:
      type: object
      properties:
        type:
          type: string
          enum:
          - less_than
        constraint:
          type: number
      required:
      - type
      - constraint
    connector._types.GreaterThanValidation:
      type: object
      properties:
        type:
          type: string
          enum:
          - greater_than
        constraint:
          type: number
      required:
      - type
      - constraint
    connector._types.ListTypeValidation:
      type: object
      properties:
        type:
          type: string
          enum:
          - list_type
        constraint:
          type: string
      required:
      - type
      - constraint
    connector._types.IncludedInValidation:
      type: object
      properties:
        type:
          type: string
          enum:
          - included_in
        constraint:
          type: array
          items:
            "$ref": "#/components/schemas/_types.ScalarValue"
      required:
      - type
      - constraint
    connector._types.RegexValidation:
      type: object
      properties:
        type:
          type: string
          enum:
          - regex
        constraint:
          type: string
      required:
      - type
      - constraint
    connector._types.ConnectorCustomScheduling:
      type: object
      additionalProperties:
        "$ref": "#/components/schemas/connector._types.CustomScheduling"
    connector._types.CustomScheduling:
      type: object
      properties:
        configuration_overrides:
          allOf:
          - "$ref": "#/components/schemas/connector._types.CustomSchedulingConfigurationOverrides"
        enabled:
          type: boolean
        interval:
          type: string
        last_synced:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        name:
          type: string
      required:
      - configuration_overrides
      - enabled
      - interval
      - name
    connector._types.CustomSchedulingConfigurationOverrides:
      type: object
      properties:
        max_crawl_depth:
          type: number
        sitemap_discovery_disabled:
          type: boolean
        domain_allowlist:
          type: array
          items:
            type: string
        sitemap_urls:
          type: array
          items:
            type: string
        seed_urls:
          type: array
          items:
            type: string
    connector._types.ConnectorFeatures:
      type: object
      properties:
        document_level_security:
          description: Indicates whether document-level security is enabled.
          allOf:
          - "$ref": "#/components/schemas/connector._types.FeatureEnabled"
        incremental_sync:
          description: Indicates whether incremental syncs are enabled.
          allOf:
          - "$ref": "#/components/schemas/connector._types.FeatureEnabled"
        native_connector_api_keys:
          description: Indicates whether managed connector API keys are enabled.
          allOf:
          - "$ref": "#/components/schemas/connector._types.FeatureEnabled"
        sync_rules:
          allOf:
          - "$ref": "#/components/schemas/connector._types.SyncRulesFeature"
    connector._types.FeatureEnabled:
      type: object
      properties:
        enabled:
          type: boolean
      required:
      - enabled
    connector._types.SyncRulesFeature:
      type: object
      properties:
        advanced:
          description: Indicates whether advanced sync rules are enabled.
          allOf:
          - "$ref": "#/components/schemas/connector._types.FeatureEnabled"
        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"
        domain:
          type: string
        draft:
          allOf:
          - "$ref": "#/components/schemas/connector._types.FilteringRules"
      required:
      - active
      - draft
    connector._types.FilteringRules:
      type: object
      properties:
        advanced_snippet:
          allOf:
          - "$ref": "#/components/schemas/connector._types.FilteringAdvancedSnippet"
        rules:
          type: array
          items:
            "$ref": "#/components/schemas/connector._types.FilteringRule"
        validation:
          allOf:
          - "$ref": "#/components/schemas/connector._types.FilteringRulesValidation"
      required:
      - advanced_snippet
      - rules
      - validation
    connector._types.FilteringAdvancedSnippet:
      type: object
      properties:
        created_at:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        updated_at:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        value:
          type: object
      required:
      - value
    connector._types.FilteringRule:
      type: object
      properties:
        created_at:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        field:
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
        id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        order:
          type: number
        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:
      - 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:
      type: object
      properties:
        errors:
          type: array
          items:
            "$ref": "#/components/schemas/connector._types.FilteringValidation"
        state:
          allOf:
          - "$ref": "#/components/schemas/connector._types.FilteringValidationState"
      required:
      - errors
      - state
    connector._types.FilteringValidation:
      type: object
      properties:
        ids:
          type: array
          items:
            "$ref": "#/components/schemas/_types.Id"
        messages:
          type: array
          items:
            type: string
      required:
      - ids
      - messages
    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:
          type: string
        reduce_whitespace:
          type: boolean
        run_ml_inference:
          type: boolean
      required:
      - extract_binary_content
      - name
      - reduce_whitespace
      - run_ml_inference
    connector._types.SchedulingConfiguration:
      type: object
      properties:
        access_control:
          allOf:
          - "$ref": "#/components/schemas/connector._types.ConnectorScheduling"
        full:
          allOf:
          - "$ref": "#/components/schemas/connector._types.ConnectorScheduling"
        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:
      - enabled
      - interval
    connector._types.ConnectorStatus:
      type: string
      enum:
      - created
      - needs_configuration
      - configured
      - connected
      - error
    connector._types.ConnectorSyncJob:
      type: object
      properties:
        cancelation_requested_at:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        canceled_at:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        completed_at:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        connector:
          allOf:
          - "$ref": "#/components/schemas/connector._types.SyncJobConnectorReference"
        created_at:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        deleted_document_count:
          type: number
        error:
          type: string
        id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        indexed_document_count:
          type: number
        indexed_document_volume:
          type: number
        job_type:
          allOf:
          - "$ref": "#/components/schemas/connector._types.SyncJobType"
        last_seen:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        metadata:
          type: object
          additionalProperties:
            type: object
        started_at:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        status:
          allOf:
          - "$ref": "#/components/schemas/connector._types.SyncStatus"
        total_document_count:
          type: number
        trigger_method:
          allOf:
          - "$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:
          allOf:
          - "$ref": "#/components/schemas/connector._types.ConnectorConfiguration"
        filtering:
          allOf:
          - "$ref": "#/components/schemas/connector._types.FilteringRules"
        id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        index_name:
          type: string
        language:
          type: string
        pipeline:
          allOf:
          - "$ref": "#/components/schemas/connector._types.IngestPipelineParams"
        service_type:
          type: string
        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.WriteResponseBase:
      type: object
      properties:
        _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.
            Sequence 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:
      - _id
      - _index
      - result
      - _shards
      - _version
    _types.Conflicts:
      type: string
      enum:
      - abort
      - proceed
    _types.Slices:
      description: Slices configuration used to parallelize a process.
      oneOf:
      - type: number
      - "$ref": "#/components/schemas/_types.SlicesCalculation"
    _types.SlicesCalculation:
      type: string
      enum:
      - auto
    _types.BulkIndexByScrollFailure:
      type: object
      properties:
        cause:
          allOf:
          - "$ref": "#/components/schemas/_types.ErrorCause"
        id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        index:
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        status:
          type: number
      required:
      - cause
      - id
      - index
      - status
    _types.Retries:
      type: object
      properties:
        bulk:
          description: The number of bulk actions retried.
          type: number
        search:
          description: The number of search actions retried.
          type: number
      required:
      - bulk
      - search
    _types.ReindexStatus:
      type: object
      properties:
        slice_id:
          description: The slice ID
          type: number
        batches:
          description: The number of scroll responses 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
        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
        requests_per_second:
          description: The number of requests per second effectively executed during
            the reindex.
          type: number
        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"
        throttled:
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        throttled_millis:
          description: 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 `_reindex` response.
            It 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"
        total:
          description: The number of documents that were successfully processed.
          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.
          type: number
        version_conflicts:
          description: The number of version conflicts that reindex hits.
          type: number
        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
    enrich.execute_policy.ExecuteEnrichPolicyStatus:
      type: object
      properties:
        phase:
          allOf:
          - "$ref": "#/components/schemas/enrich.execute_policy.EnrichPolicyPhase"
        step:
          type: string
      required:
      - phase
    enrich.execute_policy.EnrichPolicyPhase:
      type: string
      enum:
      - SCHEDULED
      - RUNNING
      - COMPLETE
      - FAILED
      - CANCELLED
    enrich._types.Summary:
      type: object
      properties:
        config:
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/enrich._types.Policy"
          minProperties: 1
          maxProperties: 1
      required:
      - config
    enrich._types.Policy:
      type: object
      properties:
        enrich_fields:
          allOf:
          - "$ref": "#/components/schemas/_types.Fields"
        indices:
          allOf:
          - "$ref": "#/components/schemas/_types.Indices"
        match_field:
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
        query:
          allOf:
          - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer"
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
        elasticsearch_version:
          type: string
      required:
      - enrich_fields
      - indices
      - match_field
    eql._types.EqlSearchResponseBase:
      type: object
      properties:
        id:
          description: Identifier for the search.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        is_partial:
          description: If true, the response does not contain complete search results.
          type: boolean
        is_running:
          description: If true, the search request is still executing.
          type: boolean
        took:
          description: Milliseconds it took Elasticsearch to execute the request.
          allOf:
          - "$ref": "#/components/schemas/_types.DurationValueUnitMillis"
        timed_out:
          description: If true, the request timed out before completion.
          type: boolean
        hits:
          description: Contains matching events and sequences. Also contains related
            metadata.
          allOf:
          - "$ref": "#/components/schemas/eql._types.EqlHits"
        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:
      - hits
    eql._types.EqlHits:
      type: object
      properties:
        total:
          description: Metadata about the number of matching events or sequences.
          allOf:
          - "$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"
        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"
        _id:
          description: Unique identifier for the event. This ID is only unique within
            the index.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        _source:
          description: Original JSON body passed for the event at index time.
          type: object
        missing:
          description: Set to `true` for events in a timespan-constrained sequence
            that do not meet a given condition.
          type: boolean
        fields:
          type: object
          additionalProperties:
            type: array
            items:
              type: object
      required:
      - _index
      - _id
      - _source
    eql._types.HitsSequence:
      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
      required:
      - events
    eql.search.ResultPosition:
      type: string
      enum:
      - tail
      - head
    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
      - start_time_millis
      - running_time_nanos
      - query
    esql._types.EsqlFormat:
      type: string
      enum:
      - csv
      - json
      - tsv
      - txt
      - yaml
      - cbor
      - smile
      - arrow
    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"
    esql._types.NamedValue:
      type: object
      additionalProperties:
        "$ref": "#/components/schemas/esql._types.SingleOrMultiValue"
      minProperties: 1
      maxProperties: 1
    esql._types.TableValuesContainer:
      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"
        double:
          type: array
          items:
            "$ref": "#/components/schemas/esql._types.TableValuesLongDouble"
      minProperties: 1
      maxProperties: 1
    esql._types.TableValuesIntegerValue:
      oneOf:
      - type: number
      - type: array
        items:
          type: number
    esql._types.TableValuesKeywordValue:
      oneOf:
      - type: string
      - type: array
        items:
          type: string
    esql._types.TableValuesLongValue:
      oneOf:
      - type: number
      - type: array
        items:
          type: number
    esql._types.TableValuesLongDouble:
      oneOf:
      - type: number
      - type: array
        items:
          type: number
    esql._types.EsqlResult:
      type: object
      properties:
        took:
          allOf:
          - "$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"
        _clusters:
          description: |-
            Cross-cluster search information. Present if `include_ccs_metadata` was `true` in the request
            and 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.
            The contents of this field are currently unstable.
          type: object
      required:
      - columns
      - values
    esql._types.EsqlColumnInfo:
      type: object
      properties:
        name:
          type: string
        type:
          type: string
      required:
      - name
      - type
    esql._types.EsqlClusterInfo:
      type: object
      properties:
        total:
          type: number
        successful:
          type: number
        running:
          type: number
        skipped:
          type: number
        partial:
          type: number
        failed:
          type: number
        details:
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/esql._types.EsqlClusterDetails"
      required:
      - total
      - successful
      - running
      - skipped
      - partial
      - failed
      - details
    esql._types.EsqlClusterDetails:
      type: object
      properties:
        status:
          allOf:
          - "$ref": "#/components/schemas/esql._types.EsqlClusterStatus"
        indices:
          type: string
        took:
          allOf:
          - "$ref": "#/components/schemas/_types.DurationValueUnitMillis"
        _shards:
          allOf:
          - "$ref": "#/components/schemas/esql._types.EsqlShardInfo"
        failures:
          type: array
          items:
            "$ref": "#/components/schemas/esql._types.EsqlShardFailure"
      required:
      - status
      - indices
    esql._types.EsqlClusterStatus:
      type: string
      enum:
      - running
      - successful
      - partial
      - skipped
      - failed
    esql._types.EsqlShardInfo:
      type: object
      properties:
        total:
          type: number
        successful:
          type: number
        skipped:
          type: number
        failed:
          type: number
      required:
      - total
    esql._types.EsqlShardFailure:
      type: object
      properties:
        shard:
          type: number
        index:
          oneOf:
          - "$ref": "#/components/schemas/_types.IndexName"
          - nullable: true
            type: string
        node:
          allOf:
          - "$ref": "#/components/schemas/_types.NodeId"
        reason:
          allOf:
          - "$ref": "#/components/schemas/_types.ErrorCause"
      required:
      - shard
      - index
      - reason
    _types.InlineGet:
      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
      required:
      - found
    _global.field_caps.FieldCapability:
      type: object
      properties:
        aggregatable:
          description: Whether this field can be aggregated on all indices.
          type: boolean
        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"
        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:
          - "$ref": "#/components/schemas/_types.Metadata"
        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"
        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"
        searchable:
          description: Whether this field is indexed for search on all indices.
          type: boolean
        type:
          type: string
        metadata_field:
          description: Whether this field is registered as a metadata field.
          type: boolean
        time_series_dimension:
          description: Whether this field is used as a time series dimension.
          x-state: Technical preview
          type: boolean
        time_series_metric:
          description: |-
            Contains metric type if this fields is used as a time series
            metrics, absent if the field is not used as metric.
          x-state: Technical preview
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.TimeSeriesMetricType"
        non_dimension_indices:
          description: |-
            If this list is present in response then some indices have the
            field marked as a dimension and other indices, the ones in this list, do not.
          x-state: Technical preview
          type: array
          items:
            "$ref": "#/components/schemas/_types.IndexName"
        metric_conflicts_indices:
          description: |-
            The list of indices where this field is present if these indices
            don’t have the same `time_series_metric` value for this field.
          x-state: Technical preview
          type: array
          items:
            "$ref": "#/components/schemas/_types.IndexName"
      required:
      - aggregatable
      - searchable
      - type
    _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:
            type: string
        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.
            Sequence 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.
            If 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:
      - _index
      - found
      - _id
    _types.StoredScript:
      type: object
      properties:
        lang:
          description: |+
            The language the script is written in.
            For search templates, use `mustache`.

            Supported values include:
              - `painless`: Painless scripting language, purpose-built for Elasticsearch.
              - `expression`: Lucene’s expressions language, compiles a JavaScript expression to bytecode.
              - `mustache`: Mustache templated, used for templates.
              - `java`: Expert Java API

          allOf:
          - "$ref": "#/components/schemas/_types.ScriptLanguage"
        options:
          type: object
          additionalProperties:
            type: string
        source:
          description: |-
            The script source.
            For search templates, an object containing the search template.
          allOf:
          - "$ref": "#/components/schemas/_types.ScriptSource"
      required:
      - lang
      - source
    _types.OpType:
      type: string
      enum:
      - index
      - create
    indices._types.IndicesBlockOptions:
      type: string
      enum:
      - metadata
      - read
      - read_only
      - write
    indices.add_block.AddIndicesBlockStatus:
      type: object
      properties:
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        blocked:
          type: boolean
      required:
      - name
      - blocked
    indices.analyze.TextToAnalyze:
      oneOf:
      - type: string
      - type: array
        items:
          type: string
    indices.analyze.AnalyzeDetail:
      type: object
      properties:
        analyzer:
          allOf:
          - "$ref": "#/components/schemas/indices.analyze.AnalyzerDetail"
        charfilters:
          type: array
          items:
            "$ref": "#/components/schemas/indices.analyze.CharFilterDetail"
        custom_analyzer:
          type: boolean
        tokenfilters:
          type: array
          items:
            "$ref": "#/components/schemas/indices.analyze.TokenDetail"
        tokenizer:
          allOf:
          - "$ref": "#/components/schemas/indices.analyze.TokenDetail"
      required:
      - custom_analyzer
    indices.analyze.AnalyzerDetail:
      type: object
      properties:
        name:
          type: string
        tokens:
          type: array
          items:
            "$ref": "#/components/schemas/indices.analyze.ExplainAnalyzeToken"
      required:
      - name
      - tokens
    indices.analyze.ExplainAnalyzeToken:
      type: object
      properties:
        bytes:
          type: string
        end_offset:
          type: number
        keyword:
          type: boolean
        position:
          type: number
        positionLength:
          type: number
        start_offset:
          type: number
        termFrequency:
          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
    indices.analyze.TokenDetail:
      type: object
      properties:
        name:
          type: string
        tokens:
          type: array
          items:
            "$ref": "#/components/schemas/indices.analyze.ExplainAnalyzeToken"
      required:
      - name
      - tokens
    indices.analyze.AnalyzeToken:
      type: object
      properties:
        end_offset:
          type: number
        position:
          type: number
        positionLength:
          type: number
        start_offset:
          type: number
        token:
          type: string
        type:
          type: string
      required:
      - end_offset
      - position
      - start_offset
      - token
      - type
    _types.DataStreamName:
      type: string
    indices.create_from.CreateFrom:
      type: object
      properties:
        mappings_override:
          description: Mappings overrides to be applied to the destination index (optional)
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.TypeMapping"
        settings_override:
          description: Settings overrides to be applied to the destination index (optional)
          allOf:
          - "$ref": "#/components/schemas/indices._types.IndexSettings"
        remove_index_blocks:
          description: If index blocks should be removed when creating destination
            index (optional)
          default: true
          type: boolean
    _types.IndicesResponseBase:
      allOf:
      - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      - type: object
        properties:
          _shards:
            allOf:
            - "$ref": "#/components/schemas/_types.ShardStatistics"
    indices.delete_alias.IndicesAliasesResponseBody:
      allOf:
      - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      - type: object
        properties:
          errors:
            type: boolean
    _types.DataStreamNames:
      oneOf:
      - "$ref": "#/components/schemas/_types.DataStreamName"
      - type: array
        items:
          "$ref": "#/components/schemas/_types.DataStreamName"
    indices.explain_data_lifecycle.DataStreamLifecycleExplain:
      type: object
      properties:
        index:
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        managed_by_lifecycle:
          type: boolean
        index_creation_date_millis:
          allOf:
          - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
        time_since_index_creation:
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        rollover_date_millis:
          allOf:
          - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
        time_since_rollover:
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        lifecycle:
          allOf:
          - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover"
        generation_time:
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        error:
          type: string
      required:
      - index
      - managed_by_lifecycle
    indices.get.Features:
      oneOf:
      - "$ref": "#/components/schemas/indices.get.Feature"
      - type: array
        items:
          "$ref": "#/components/schemas/indices.get.Feature"
    indices.get.Feature:
      type: string
      enum:
      - aliases
      - mappings
      - settings
    indices._types.IndexState:
      type: object
      properties:
        aliases:
          type: object
          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
          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
    indices.get_data_lifecycle.DataStreamWithLifecycle:
      type: object
      properties:
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.DataStreamName"
        lifecycle:
          allOf:
          - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover"
      required:
      - name
    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.
            If empty, the response omits this property.
          allOf:
          - "$ref": "#/components/schemas/_types.Metadata"
        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.
            This lifecycle policy is set in the `index.lifecycle.name` setting.
            If the template does not include a lifecycle policy, this property is not included in the response.
            NOTE: 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.
            The 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
          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
            template.
          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
            template.
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.TypeMapping"
        status:
          description: |+
            Health status of the data stream.
            This health status is based on the state of the primary and replica shards of the stream’s backing indices.

            Supported values include:
              - `green` (or `GREEN`): All shards are assigned.
              - `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.
              - `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.
              - `unknown`
              - `unavailable`

          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
          type: boolean
        template:
          description: |-
            Name of the index template used to create the data stream’s backing indices.
            The 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:
      - generation
      - hidden
      - next_generation_managed_by
      - prefer_ilm
      - indices
      - name
      - rollover_on_write
      - settings
      - status
      - template
      - timestamp_field
    indices._types.FailureStore:
      type: object
      properties:
        enabled:
          type: boolean
        indices:
          type: array
          items:
            "$ref": "#/components/schemas/indices._types.DataStreamIndex"
        rollover_on_write:
          type: boolean
      required:
      - enabled
      - indices
      - rollover_on_write
    indices._types.DataStreamIndex:
      type: object
      properties:
        index_name:
          description: Name of the backing index.
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        index_uuid:
          description: Universally unique identifier (UUID) for the index.
          allOf:
          - "$ref": "#/components/schemas/_types.Uuid"
        ilm_policy:
          description: Name of the current ILM lifecycle policy configured for this
            backing index.
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
        managed_by:
          description: Name of the lifecycle system that's currently managing this
            backing index.
          allOf:
          - "$ref": "#/components/schemas/indices._types.ManagedBy"
        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:
      - 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:
          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"
      required:
      - name
    indices.get_data_stream_mappings.DataStreamMappings:
      type: object
      properties:
        name:
          description: The name of the data stream.
          type: string
        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`
            are the settings that will be used when a new index is created for this data stream.
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.TypeMapping"
      required:
      - name
      - mappings
      - effective_mappings
    indices.get_data_stream_options.DataStreamWithOptions:
      type: object
      properties:
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.DataStreamName"
        options:
          allOf:
          - "$ref": "#/components/schemas/indices._types.DataStreamOptions"
      required:
      - name
    indices.get_data_stream_settings.DataStreamSettings:
      type: object
      properties:
        name:
          description: The name of the data stream.
          type: string
        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`
            are the settings that will be used when a new index is created for this data stream.
          allOf:
          - "$ref": "#/components/schemas/indices._types.IndexSettings"
      required:
      - name
      - settings
      - effective_settings
    indices.get_index_template.IndexTemplateItem:
      type: object
      properties:
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
        index_template:
          allOf:
          - "$ref": "#/components/schemas/indices._types.IndexTemplate"
      required:
      - name
      - index_template
    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"
        composed_of:
          description: |-
            An ordered list of component template names.
            Component 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.
            It 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.
            This 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.
            The index template with the highest priority is chosen.
            If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
            This number is not automatically generated by Elasticsearch.
          type: number
        _meta:
          description: |-
            Optional user metadata about the index template. May have any contents.
            This 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.
            Supports an empty object.
            Data 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.
            When creating or updating a non-deprecated index template that uses deprecated components,
            Elasticsearch will emit a deprecation warning.
          x-state: Generally available
          type: boolean
        ignore_missing_component_templates:
          description: A list of component template names that are allowed to be absent.
          x-state: Generally available
          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
          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
          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
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        modified_date_millis:
          description: Date and time when the index template was last modified, in
            milliseconds since the epoch.
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
      required:
      - index_patterns
      - composed_of
    indices._types.IndexTemplateSummary:
      type: object
      properties:
        aliases:
          description: |-
            Aliases to add.
            If the index template includes a `data_stream` object, these are data stream aliases.
            Otherwise, these are index aliases.
            Data stream aliases ignore the `index_routing`, `routing`, and `search_routing` options.
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/indices._types.Alias"
        mappings:
          description: |-
            Mapping for fields in the index.
            If 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
          allOf:
          - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleWithRollover"
        data_stream_options:
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/indices._types.DataStreamOptions"
    indices._types.IndexTemplateDataStreamConfiguration:
      type: object
      properties:
        hidden:
          description: If true, the data stream is hidden.
          default: false
          type: boolean
        allow_custom_routing:
          description: If true, the data stream supports custom routing.
          default: false
          type: boolean
    indices.get_mapping.IndexMappingRecord:
      type: object
      properties:
        item:
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.TypeMapping"
        mappings:
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.TypeMapping"
      required:
      - mappings
    indices.get_migrate_reindex_status.StatusInProgress:
      type: object
      properties:
        index:
          type: string
        total_doc_count:
          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.modify_data_stream.Action:
      type: object
      properties:
        add_backing_index:
          description: |-
            Adds an existing index as a backing index for a data stream.
            The index is hidden as part of this operation.
            WARNING: Adding indices with the `add_backing_index` action can potentially result in improper data stream behavior.
            This should be considered an expert level API.
          allOf:
          - "$ref": "#/components/schemas/indices.modify_data_stream.IndexAndDataStreamAction"
        remove_backing_index:
          description: |-
            Removes a backing index from a data stream.
            The index is unhidden as part of this operation.
            A data stream’s write index cannot be removed.
          allOf:
          - "$ref": "#/components/schemas/indices.modify_data_stream.IndexAndDataStreamAction"
      minProperties: 1
      maxProperties: 1
    indices.modify_data_stream.IndexAndDataStreamAction:
      type: object
      properties:
        data_stream:
          description: Data stream targeted by the action.
          allOf:
          - "$ref": "#/components/schemas/_types.DataStreamName"
        index:
          description: Index for the action.
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
      required:
      - data_stream
      - index
    indices.put_data_stream_mappings.UpdatedDataStreamMappings:
      type: object
      properties:
        name:
          description: The data stream name.
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        applied_to_data_stream:
          description: |-
            If the mappings were successfully applied to the data stream (or would have been, if running in `dry_run`
            mode), 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
            template and the mappings specific to this data stream.
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.TypeMapping"
      required:
      - name
      - applied_to_data_stream
    indices.put_data_stream_settings.UpdatedDataStreamSettings:
      type: object
      properties:
        name:
          description: The data stream name.
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        applied_to_data_stream:
          description: |-
            If the settings were successfully applied to the data stream (or would have been, if running in `dry_run`
            mode), 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
            template 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
    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
            the write index the next time the data stream is rolled over.
          type: array
          items:
            type: string
        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
            also 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
    indices.put_data_stream_settings.DataStreamSettingsError:
      type: object
      properties:
        index:
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        error:
          description: A message explaining why the settings could not be applied
            to specific indices.
          type: string
      required:
      - index
      - error
    indices._types.DataStreamVisibility:
      type: object
      properties:
        hidden:
          type: boolean
        allow_custom_routing:
          type: boolean
    _types.ShardsOperationResponseBase:
      type: object
      properties:
        _shards:
          allOf:
          - "$ref": "#/components/schemas/_types.ShardStatistics"
    indices.remove_block.RemoveIndicesBlockStatus:
      type: object
      properties:
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        unblocked:
          type: boolean
        exception:
          allOf:
          - "$ref": "#/components/schemas/_types.ErrorCause"
      required:
      - name
    indices.resolve_index.ResolveIndexItem:
      type: object
      properties:
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
        aliases:
          type: array
          items:
            type: string
        attributes:
          type: array
          items:
            type: string
        data_stream:
          allOf:
          - "$ref": "#/components/schemas/_types.DataStreamName"
        mode:
          allOf:
          - "$ref": "#/components/schemas/indices._types.IndexMode"
      required:
      - name
      - attributes
    indices.resolve_index.ResolveIndexAliasItem:
      type: object
      properties:
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
        indices:
          allOf:
          - "$ref": "#/components/schemas/_types.Indices"
      required:
      - name
      - indices
    indices.resolve_index.ResolveIndexDataStreamsItem:
      type: object
      properties:
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.DataStreamName"
        timestamp_field:
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
        backing_indices:
          allOf:
          - "$ref": "#/components/schemas/_types.Indices"
      required:
      - name
      - timestamp_field
      - backing_indices
    _types.IndexAlias:
      type: string
    indices.rollover.RolloverConditions:
      type: object
      properties:
        min_age:
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        max_age:
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        max_age_millis:
          allOf:
          - "$ref": "#/components/schemas/_types.DurationValueUnitMillis"
        min_docs:
          type: number
        max_docs:
          type: number
        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"
        max_size_bytes:
          type: number
        min_size:
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        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.simulate_template.Overlapping:
      type: object
      properties:
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
        index_patterns:
          type: array
          items:
            type: string
      required:
      - name
      - index_patterns
    indices.simulate_template.Template:
      type: object
      properties:
        aliases:
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/indices._types.Alias"
        mappings:
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.TypeMapping"
        settings:
          allOf:
          - "$ref": "#/components/schemas/indices._types.IndexSettings"
      required:
      - aliases
      - mappings
      - settings
    indices.update_aliases.Action:
      type: object
      properties:
        add:
          description: |-
            Adds a data stream or index to an alias.
            If the alias doesn’t exist, the `add` action creates it.
          allOf:
          - "$ref": "#/components/schemas/indices.update_aliases.AddAction"
        remove:
          description: Removes a data stream or index from an alias.
          allOf:
          - "$ref": "#/components/schemas/indices.update_aliases.RemoveAction"
        remove_index:
          description: |-
            Deletes an index.
            You cannot use this action on aliases or data streams.
          allOf:
          - "$ref": "#/components/schemas/indices.update_aliases.RemoveIndexAction"
      minProperties: 1
      maxProperties: 1
    indices.update_aliases.AddAction:
      type: object
      properties:
        alias:
          description: |-
            Alias for the action.
            Index alias names support date math.
          allOf:
          - "$ref": "#/components/schemas/_types.IndexAlias"
        aliases:
          description: |-
            Aliases for the action.
            Index alias names support date math.
          oneOf:
          - "$ref": "#/components/schemas/_types.IndexAlias"
          - type: array
            items:
              "$ref": "#/components/schemas/_types.IndexAlias"
        filter:
          description: Query used to limit documents the alias can access.
          allOf:
          - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer"
        index:
          description: |-
            Data stream or index for the action.
            Supports wildcards (`*`).
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        indices:
          description: |-
            Data streams or indices for the action.
            Supports wildcards (`*`).
          allOf:
          - "$ref": "#/components/schemas/_types.Indices"
        index_routing:
          description: |-
            Value used to route indexing operations to a specific shard.
            If specified, this overwrites the `routing` value for indexing operations.
            Data stream aliases don’t support this parameter.
          allOf:
          - "$ref": "#/components/schemas/_types.Routing"
        is_hidden:
          description: If `true`, the alias is hidden.
          default: false
          type: boolean
        is_write_index:
          description: If `true`, sets the write index or data stream for the alias.
          type: boolean
        routing:
          description: |-
            Value used to route indexing and search operations to a specific shard.
            Data 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.
            If specified, this overwrites the `routing` value for search operations.
            Data stream aliases don’t support this parameter.
          allOf:
          - "$ref": "#/components/schemas/_types.Routing"
        must_exist:
          description: If `true`, the alias must exist to perform the action.
          default: false
          type: boolean
    indices.update_aliases.RemoveAction:
      type: object
      properties:
        alias:
          description: |-
            Alias for the action.
            Index alias names support date math.
          allOf:
          - "$ref": "#/components/schemas/_types.IndexAlias"
        aliases:
          description: |-
            Aliases for the action.
            Index alias names support date math.
          oneOf:
          - "$ref": "#/components/schemas/_types.IndexAlias"
          - type: array
            items:
              "$ref": "#/components/schemas/_types.IndexAlias"
        index:
          description: |-
            Data stream or index for the action.
            Supports wildcards (`*`).
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        indices:
          description: |-
            Data streams or indices for the action.
            Supports wildcards (`*`).
          allOf:
          - "$ref": "#/components/schemas/_types.Indices"
        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.
            Supports wildcards (`*`).
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        indices:
          description: |-
            Data streams or indices for the action.
            Supports wildcards (`*`).
          allOf:
          - "$ref": "#/components/schemas/_types.Indices"
        must_exist:
          description: If `true`, the alias must exist to perform the action.
          default: false
          type: boolean
    indices.validate_query.IndicesValidationExplanation:
      type: object
      properties:
        error:
          type: string
        explanation:
          type: string
        index:
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        valid:
          type: boolean
      required:
      - index
      - valid
    inference._types.RequestChatCompletion:
      type: object
      properties:
        messages:
          description: |-
            A list of objects representing the conversation.
            Requests should generally only add new messages from the user (role `user`).
            The 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"
        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
        max_completion_tokens:
          description: The upper bound limit for the number of tokens that can be
            generated for a completion request.
          type: number
        stop:
          description: A sequence of strings to control when the model should stop
            generating additional tokens.
          type: array
          items:
            type: string
        temperature:
          description: The sampling temperature to use.
          type: number
        tool_choice:
          description: |-
            Controls which tool is called by the model.
            String 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.
            Example (object representation):
            ```
            {
              "tool_choice": {
                  "type": "function",
                  "function": {
                      "name": "get_current_weather"
                  }
              }
            }
            ```
          allOf:
          - "$ref": "#/components/schemas/inference._types.CompletionToolType"
        tools:
          description: |-
            A list of tools that the model can call.
            Example:
            ```
            {
              "tools": [
                  {
                      "type": "function",
                      "function": {
                          "name": "get_price_of_item",
                          "description": "Get the current price of an item",
                          "parameters": {
                              "type": "object",
                              "properties": {
                                  "item": {
                                      "id": "12345"
                                  },
                                  "unit": {
                                      "type": "currency"
                                  }
                              }
                          }
                      }
                  }
              ]
            }
            ```
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.CompletionTool"
        top_p:
          description: Nucleus sampling, an alternative to sampling with temperature.
          type: number
      required:
      - messages
    inference._types.Message:
      description: An object representing part of the conversation.
      type: object
      properties:
        content:
          description: |-
            The content of the message.

            String example:
            ```
            {
               "content": "Some string"
            }
            ```

            Object example:
            ```
            {
              "content": [
                  {
                   "text": "Some text",
                   "type": "text"
                  }
               ]
            }
            ```
          allOf:
          - "$ref": "#/components/schemas/inference._types.MessageContent"
        role:
          description: The role of the message author. Valid values are `user`, `assistant`,
            `system`, and `tool`.
          type: string
        tool_call_id:
          description: Only for `tool` role messages. The tool call that this message
            is responding to.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        tool_calls:
          description: |-
            Only for `assistant` role messages. The tool calls generated by the model. If it's specified, the `content` field is optional.
            Example:
            ```
            {
              "tool_calls": [
                  {
                      "id": "call_KcAjWtAww20AihPHphUh46Gd",
                      "type": "function",
                      "function": {
                          "name": "get_current_weather",
                          "arguments": "{\"location\":\"Boston, MA\"}"
                      }
                  }
              ]
            }
            ```
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.ToolCall"
      required:
      - role
    inference._types.MessageContent:
      oneOf:
      - type: string
      - type: array
        items:
          "$ref": "#/components/schemas/inference._types.ContentObject"
    inference._types.ContentObject:
      description: An object style representation of a single portion of a conversation.
      type: object
      properties:
        text:
          description: The text content.
          type: string
        type:
          description: The type of content.
          type: string
      required:
      - text
      - type
    inference._types.ToolCall:
      description: A tool call generated by the model.
      type: object
      properties:
        id:
          description: The identifier of the tool call.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        function:
          description: The function that the model called.
          allOf:
          - "$ref": "#/components/schemas/inference._types.ToolCallFunction"
        type:
          description: The type of the tool call.
          type: string
      required:
      - id
      - function
      - type
    inference._types.ToolCallFunction:
      description: The function that the model called.
      type: object
      properties:
        arguments:
          description: The arguments to call the function with in JSON format.
          type: string
        name:
          description: The name of the function to call.
          type: string
      required:
      - arguments
      - name
    inference._types.CompletionToolType:
      oneOf:
      - type: string
      - "$ref": "#/components/schemas/inference._types.CompletionToolChoice"
    inference._types.CompletionToolChoice:
      description: Controls which tool is called by the model.
      type: object
      properties:
        type:
          description: The type of the tool.
          type: string
        function:
          description: The tool choice function.
          allOf:
          - "$ref": "#/components/schemas/inference._types.CompletionToolChoiceFunction"
      required:
      - type
      - function
    inference._types.CompletionToolChoiceFunction:
      description: The tool choice function.
      type: object
      properties:
        name:
          description: The name of the function to call.
          type: string
      required:
      - name
    inference._types.CompletionTool:
      description: A list of tools that the model can call.
      type: object
      properties:
        type:
          description: The type of tool.
          type: string
        function:
          description: The function definition.
          allOf:
          - "$ref": "#/components/schemas/inference._types.CompletionToolFunction"
      required:
      - type
      - function
    inference._types.CompletionToolFunction:
      description: The completion tool function definition.
      type: object
      properties:
        description:
          description: |-
            A description of what the function does.
            This 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
        parameters:
          description: The parameters the functional accepts. This should be formatted
            as a JSON object.
          type: object
        strict:
          description: Whether to enable schema adherence when generating the function
            call.
          type: boolean
      required:
      - name
    _types.StreamResult:
      type: object
    inference._types.TaskSettings:
      type: object
    inference._types.CompletionInferenceResult:
      description: Defines the completion result.
      type: object
      properties:
        completion:
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.CompletionResult"
      required:
      - completion
    inference._types.CompletionResult:
      description: The completion result object
      type: object
      properties:
        result:
          type: string
      required:
      - result
    inference._types.TaskType:
      type: string
      enum:
      - sparse_embedding
      - text_embedding
      - rerank
      - completion
      - chat_completion
      - embedding
    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:
        input:
          description: |-
            Inference input.
            Either a string, an array of strings, a `content` object, or an array of `content` objects.

            string example:
            ```
            "input": "Some text"
            ```
            string array example:
            ```
            "input": ["Some text", "Some more text"]
            ```
            `content` object example:
            ```
            "input": {
                "content": {
                  "type": "image",
                  "format": "base64",
                  "value": "data:image/jpg;base64,..."
                }
              }
            ```
            `content` object array example:
            ```
            "input": [
              {
                "content": {
                  "type": "text",
                  "format": "text",
                  "value": "Some text to generate an embedding"
                }
              },
              {
                "content": {
                  "type": "image",
                  "format": "base64",
                  "value": "data:image/jpg;base64,..."
                }
              }
            ]
            ```
          allOf:
          - "$ref": "#/components/schemas/inference._types.EmbeddingInput"
        input_type:
          description: |-
            The input data type for the embedding model. Possible values include:
            * `SEARCH`
            * `INGEST`
            * `CLASSIFICATION`
            * `CLUSTERING`

            Not all models support all values. Unsupported values will trigger a validation exception.
            Accepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.

            > info
            > 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 <task_type> you specified and override the task settings
            specified when initializing the service.
          allOf:
          - "$ref": "#/components/schemas/inference._types.TaskSettings"
      required:
      - input
    inference._types.EmbeddingInput:
      description: |-
        Inference input.
        Either a string, an array of strings, a `content` object, or an array of `content` objects.
      oneOf:
      - "$ref": "#/components/schemas/inference._types.EmbeddingStringInput"
      - "$ref": "#/components/schemas/inference._types.EmbeddingContentInput"
    inference._types.EmbeddingStringInput:
      description: Allows specifying text-only inputs for the `embedding` task.
      oneOf:
      - type: string
      - 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:
      - content
    inference._types.EmbeddingContentObjectContents:
      description: An object containing the input data for the model to embed.
      type: object
      properties:
        type:
          description: The type of input to embed.
          allOf:
          - "$ref": "#/components/schemas/inference._types.EmbeddingContentType"
        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"
        value:
          description: The value of the input to embed.
          type: string
      required:
      - type
      - value
    inference._types.EmbeddingContentType:
      type: string
      enum:
      - text
      - image
    inference._types.EmbeddingContentFormat:
      type: string
      enum:
      - text
      - base64
    inference._types.EmbeddingInferenceResult:
      description: EmbeddingInferenceResult is an aggregation of mutually exclusive
        embeddings variants
      type: object
      properties:
        embeddings_bytes:
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.DenseEmbeddingByteResult"
        embeddings_bits:
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.DenseEmbeddingByteResult"
        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:
      - embedding
    inference._types.DenseByteVector:
      description: |-
        Dense Embedding results containing bytes are represented as Dense
        Vectors 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:
        embedding:
          allOf:
          - "$ref": "#/components/schemas/inference._types.DenseVector"
      required:
      - embedding
    inference._types.DenseVector:
      description: |-
        Dense Embedding results are represented as Dense Vectors
        of 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:
        chunking_settings:
          description: |-
            The chunking configuration object.
            Applies only to the `embedding`, `sparse_embedding` and `text_embedding` task types.
            Not applicable to the `rerank`, `completion`, or `chat_completion` task types.
          allOf:
          - "$ref": "#/components/schemas/inference._types.InferenceChunkingSettings"
        service:
          description: The service type
          type: string
        service_settings:
          description: Settings specific to the service
          allOf:
          - "$ref": "#/components/schemas/inference._types.ServiceSettings"
        task_settings:
          description: Task settings specific to the service and task type
          allOf:
          - "$ref": "#/components/schemas/inference._types.TaskSettings"
      required:
      - service
      - service_settings
    inference._types.InferenceChunkingSettings:
      description: Chunking configuration object
      type: object
      properties:
        max_chunk_size:
          description: |-
            The maximum size of a chunk in words.
            This value cannot be lower than `20` (for `sentence` strategy) or `10` (for `word` strategy).
            This value should not exceed the window size for the associated model.
          default: 250
          type: number
        overlap:
          description: |-
            The number of overlapping words for chunks.
            It is applicable only to a `word` chunking strategy.
            This value cannot be higher than half the `max_chunk_size` value.
          default: 100
          type: number
        sentence_overlap:
          description: |-
            The number of overlapping sentences for chunks.
            It is applicable only for a `sentence` chunking strategy.
            It can be either `1` or `0`.
          default: 1
          type: number
        separator_group:
          description: |-
            Only applicable to the `recursive` strategy and required when using it.

            Sets a predefined list of separators in the saved chunking settings based on the selected text type.
            Values can be `markdown` or `plaintext`.

            Using 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.

            A list of strings used as possible split points when chunking text.

            Each string can be a plain string or a regular expression (regex) pattern.
            The system tries each separator in order to split the text, starting from the first item in the list.

            After splitting, it attempts to recombine smaller pieces into larger chunks that stay within
            the `max_chunk_size` limit, to reduce the total number of chunks generated.
          type: array
          items:
            type: string
        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`.

             * If `strategy` is set to `recursive`, you must also specify:

            - `max_chunk_size`
            - either `separators` or`separator_group`

            Learn 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:
            "$ref": "#/components/schemas/inference._types.DenseEmbeddingByteResult"
        embeddings_bits:
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.DenseEmbeddingByteResult"
        embeddings:
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.DenseEmbeddingResult"
        text_embedding_bytes:
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.DenseEmbeddingByteResult"
        text_embedding_bits:
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.DenseEmbeddingByteResult"
        text_embedding:
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.DenseEmbeddingResult"
        sparse_embedding:
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.SparseEmbeddingResult"
        completion:
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.CompletionResult"
        rerank:
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.RankedDocument"
      minProperties: 1
      maxProperties: 1
    inference._types.SparseEmbeddingResult:
      type: object
      properties:
        is_truncated:
          description: Indicates if the text input was truncated in the request sent
            to the service
          type: boolean
        embedding:
          allOf:
          - "$ref": "#/components/schemas/inference._types.SparseVector"
      required:
      - is_truncated
      - embedding
    inference._types.SparseVector:
      description: |-
        Sparse Embedding tokens are represented as a dictionary
        of string to double.
      type: object
      additionalProperties:
        type: number
    inference._types.RankedDocument:
      description: |-
        The rerank result object representing a single ranked document
        id: the original index of the document in the request
        relevance_score: the relevance_score of the document relative to the query
        text: Optional, the text of the document, if requested
      type: object
      properties:
        index:
          type: number
        relevance_score:
          type: number
        text:
          type: string
      required:
      - index
      - relevance_score
    inference._types.Ai21TaskType:
      type: string
      enum:
      - completion
      - chat_completion
    inference._types.Ai21ServiceType:
      type: string
      enum:
      - ai21
    inference._types.Ai21ServiceSettings:
      type: object
      properties:
        model_id:
          externalDocs:
            url: https://docs.ai21.com/docs/jamba-foundation-models
          description: |-
            The name of the model to use for the inference task.
            Refer to the AI21 models documentation for the list of supported models and versions.
            Service has been tested and confirmed to be working for `completion` and `chat_completion` tasks with the following models:
            * `jamba-mini`
            * `jamba-large`
          type: string
        api_key:
          description: |-
            A valid API key for accessing AI21 API.

            IMPORTANT: You need to provide the API key only once, during the inference model creation.
            The 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.
            By 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:
      - 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.
            By default, the number of requests allowed per minute is set by each service as follows:

            * `alibabacloud-ai-search` service: `1000`
            * `amazonbedrock` service: `240`
            * `anthropic` service: `50`
            * `azureaistudio` service: `240`
            * `azureopenai` service and task type `text_embedding`: `1440`
            * `azureopenai` service and task types `completion` or `chat_completion`: `120`
            * `cohere` service: `10000`
            * `contextualai` service: `1000`
            * `elastic` service and task type `chat_completion`: `240`
            * `googleaistudio` service: `360`
            * `googlevertexai` service: `30000`
            * `hugging_face` service: `3000`
            * `jinaai` service: `2000`
            * `llama` service: `3000`
            * `mistral` service: `240`
            * `openai` service and task type `text_embedding`: `3000`
            * `openai` service and task type `completion`: `500`
            * `openshift_ai` service: `3000`
            * `voyageai` service: `2000`
            * `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
    inference._types.AlibabaCloudServiceType:
      type: string
      enum:
      - alibabacloud-ai-search
    inference._types.AlibabaCloudServiceSettings:
      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.
            You can find the host address in the API keys section of the documentation.
          type: string
        rate_limit:
          description: |-
            This setting helps to minimize the number of rate limit errors returned from AlibabaCloud AI Search.
            By default, the `alibabacloud-ai-search` service sets the number of requests allowed per minute to `1000`.
          allOf:
          - "$ref": "#/components/schemas/inference._types.RateLimitSetting"
        service_id:
          description: |-
            The name of the model service to use for the inference task.
            The following service IDs are available for the `completion` task:

            * `ops-qwen-turbo`
            * `qwen-turbo`
            * `qwen-plus`
            * `qwen-max ÷ qwen-max-longcontext`

            The following service ID is available for the `rerank` task:

            * `ops-bge-reranker-larger`

            The following service ID is available for the `sparse_embedding` task:

            * `ops-text-sparse-embedding-001`

            The following service IDs are available for the `text_embedding` task:

            `ops-text-embedding-001`
            `ops-text-embedding-zh-001`
            `ops-text-embedding-en-001`
            `ops-text-embedding-002`
          type: string
        workspace:
          description: The name of the workspace used for the inference task.
          type: string
      required:
      - api_key
      - host
      - service_id
      - workspace
    inference._types.AlibabaCloudTaskSettings:
      type: object
      properties:
        input_type:
          description: |-
            For a `sparse_embedding` or `text_embedding` task, specify the type of input passed to the model.
            Valid values are:

            * `ingest` for storing document embeddings in a vector database.
            * `search` for storing embeddings of search queries run against a vector database to find relevant documents.
          type: string
        return_token:
          description: |-
            For a `sparse_embedding` task, it affects whether the token name will be returned in the response.
            It 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"
      - 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
    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:
        access_key:
          description: A valid AWS access key that has permissions to use Amazon Bedrock
            and access to models for inference requests.
          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.
            The base model IDs can be found in the Amazon Bedrock documentation.
            Note that the model ID must be available for the provider chosen and your IAM user must have access to the model.
          type: string
        provider:
          description: |-
            The model provider for your deployment.
            Note that some providers may support only certain task types.
            Supported providers include:

            * `amazontitan` - available for `text_embedding` and `completion` task types
            * `anthropic` - available for `chat_completion` and `completion` task types
            * `ai21labs` - available for `chat_completion` and `completion` task types
            * `cohere` - available for `chat_completion`, `completion` and `text_embedding` task types
            * `meta` - available for `chat_completion` and `completion` task types
            * `mistral` - available for `chat_completion` and `completion` task types
          type: string
        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.
            The list of available regions per model can be found in the Amazon Bedrock documentation.
          type: string
        rate_limit:
          description: |-
            This setting helps to minimize the number of rate limit errors returned from Amazon Bedrock.
            By default, the `amazonbedrock` service sets the number of requests allowed per minute to 240.
          allOf:
          - "$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`.
            For informationg about creating and managing access and secret keys, refer to the AWS documentation.
          type: string
      required:
      - access_key
      - model
      - region
      - secret_key
    inference._types.AmazonBedrockTaskSettings:
      type: object
      properties:
        max_new_tokens:
          description: For `chat_completion` and `completion` tasks, it sets the maximum
            number for the output tokens to be generated.
          default: 64
          type: number
        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.
            At temperature 0.0 the model is most deterministic, at temperature 1.0 most random.
            It should not be used if `top_p` or `top_k` is specified.
          type: number
        top_k:
          description: |-
            For `chat_completion` and `completion` tasks, it limits samples to the top-K most likely words, balancing coherence and variability.
            It is only available for anthropic, cohere, and mistral providers.
            It is an alternative to `temperature`; it should not be used if `temperature` is specified.
          type: number
        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.
            Top-p uses nucleus sampling to select top tokens whose sum of likelihoods does not exceed a certain value, ensuring both variety and coherence.
            It 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"
      - 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
        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
        api:
          description: |-
            The API format to use when calling SageMaker.
            Elasticsearch will convert the POST _inference request to this data format when invoking the SageMaker endpoint.
          allOf:
          - "$ref": "#/components/schemas/inference._types.AmazonSageMakerApi"
        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.
            The list of available regions per model can be found in the Amazon SageMaker documentation.
          type: string
        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`.
            For information about creating and managing access and secret keys, refer to the AWS documentation.
          type: string
        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
        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
        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
        batch_size:
          description: |-
            The maximum number of inputs in each batch. This value is used by inference ingestion pipelines
            when processing semantic values. It correlates to the number of times the SageMaker endpoint is
            invoked (one per batch of input).
          default: 256
          type: number
        dimensions:
          description: |-
            The number of dimensions returned by the text embedding models. If this value is not provided, then
            it is guessed by making invoking the endpoint for the `text_embedding` task.
          type: number
      required:
      - access_key
      - endpoint_name
      - api
      - region
      - secret_key
    inference._types.AmazonSageMakerApi:
      type: string
      enum:
      - openai
      - elastic
    inference._types.AmazonSageMakerTaskSettings:
      type: object
      properties:
        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.
            Values will be returned in the `X-elastic-sagemaker-custom-attributes` header.
          type: string
        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
        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
        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.
            New sessions will be returned in the `X-elastic-sagemaker-new-session-id` header.
            Closed sessions will be returned in the `X-elastic-sagemaker-closed-session-id` header.
          type: string
        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"
      - 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
    inference._types.AnthropicTaskType:
      type: string
      enum:
      - completion
    inference._types.AnthropicServiceType:
      type: string
      enum:
      - anthropic
    inference._types.AnthropicServiceSettings:
      type: object
      properties:
        api_key:
          description: A valid API key for the Anthropic API.
          type: string
        model_id:
          description: |-
            The name of the model to use for the inference task.
            Refer to the Anthropic documentation for the list of supported models.
          type: string
        rate_limit:
          description: |-
            This setting helps to minimize the number of rate limit errors returned from Anthropic.
            By default, the `anthropic` service sets the number of requests allowed per minute to 50.
          allOf:
          - "$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.
          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.
            For more details about the supported range, refer to Anthropic documentation.
          type: number
        top_k:
          description: |-
            For a `completion` task, it specifies to only sample from the top K options for each subsequent token.
            It is recommended for advanced use cases only.
            You usually only need to use `temperature`.
          type: number
        top_p:
          description: |-
            For a `completion` task, it specifies to use Anthropic's nucleus sampling.
            In 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.
            You should either alter `temperature` or `top_p`, but not both.
            It is recommended for advanced use cases only.
            You usually only need to use `temperature`.
          type: number
      required:
      - max_tokens
    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:
        api_key:
          externalDocs:
            url: https://ai.azure.com/
          description: |-
            A valid API key of your Azure AI Studio model deployment.
            This key can be found on the overview page for your deployment in the management section of your Azure AI Studio account.

            IMPORTANT: You need to provide the API key only once, during the inference model creation.
            The get inference endpoint API does not retrieve your API key.
          type: string
        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`.
            The `token` endpoint type is for "pay as you go" endpoints that are billed per token.
            The `realtime` endpoint type is for "real-time" endpoints that are billed per hour of usage.
          type: string
        target:
          description: |-
            The target URL of your Azure AI Studio model deployment.
            This can be found on the overview page for your deployment in the management section of your Azure AI Studio account.
          type: string
        provider:
          description: |-
            The model provider for your deployment.
            Note that some providers may support only certain task types.
            Supported providers include:

            * `cohere` - available for `text_embedding`, `rerank` and `completion` task types
            * `databricks` - available for `completion` task type only
            * `meta` - available for `completion` task type only
            * `microsoft_phi` - available for `completion` task type only
            * `mistral` - available for `completion` task type only
            * `openai` - available for `text_embedding` and `completion` task types
          type: string
        rate_limit:
          description: |-
            This setting helps to minimize the number of rate limit errors returned from Azure AI Studio.
            By default, the `azureaistudio` service sets the number of requests allowed per minute to 240.
          allOf:
          - "$ref": "#/components/schemas/inference._types.RateLimitSetting"
      required:
      - api_key
      - endpoint_type
      - target
      - provider
    inference._types.AzureAiStudioTaskSettings:
      type: object
      properties:
        do_sample:
          description: |-
            For a `completion` task, instruct the inference process to perform sampling.
            It 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.
          default: 64
          type: number
        temperature:
          description: |-
            For a `completion` task, control the apparent creativity of generated completions with a sampling temperature.
            It must be a number in the range of 0.0 to 2.0.
            It should not be used if `top_p` is specified.
          type: number
        top_p:
          description: |-
            For a `completion` task, make the model consider the results of the tokens with nucleus sampling probability.
            It is an alternative value to `temperature` and must be a number in the range of 0.0 to 2.0.
            It should not be used if `temperature` is specified.
          type: number
        user:
          description: |-
            For a `text_embedding` task, specify the user issuing the request.
            This information can be used for abuse detection.
          type: string
        return_documents:
          description: For a `rerank` task, return doc text within the results.
          type: boolean
        top_n:
          description: |-
            For a `rerank` task, the number of most relevant documents to return.
            It defaults to the number of the documents.
          type: number
    inference._types.InferenceEndpointInfoAzureAIStudio:
      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.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.
            You must specify either `api_key` or `entra_id`.
            If you do not provide either or you provide both, you will receive an error when you try to create your model.

            IMPORTANT: You need to provide the API key only once, during the inference model creation.
            The get inference endpoint API does not retrieve your API key.
          type: string
        api_version:
          description: |-
            The Azure API version ID to use.
            It 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.
            Your 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.
            You must specify either `api_key` or `entra_id`.
            If you do not provide either or you provide both, you will receive an error when you try to create your model.
          type: string
        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.
            The `azureopenai` service sets a default number of requests allowed per minute depending on the task type.
            For `text_embedding`, it is set to `1440`.
            For `completion` and `chat_completion`, it is set to `120`.
          allOf:
          - "$ref": "#/components/schemas/inference._types.RateLimitSetting"
        resource_name:
          externalDocs:
            url: https://portal.azure.com/#view/HubsExtension/BrowseAll
          description: |-
            The name of your Azure OpenAI resource.
            You can find this from the list of resources in the Azure Portal for your subscription.
          type: string
      required:
      - api_version
      - deployment_id
      - resource_name
    inference._types.AzureOpenAITaskSettings:
      type: object
      properties:
        user:
          description: |-
            For a `completion`, `chat_completion` or `text_embedding` task, specify the user issuing the request.
            This information can be used for abuse detection.
          type: string
    inference._types.InferenceEndpointInfoAzureOpenAI:
      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.TaskTypeAzureOpenAI"
        required:
        - inference_id
        - task_type
    inference._types.TaskTypeAzureOpenAI:
      type: string
      enum:
      - text_embedding
      - completion
      - chat_completion
    inference._types.CohereTaskType:
      type: string
      enum:
      - completion
      - rerank
      - text_embedding
    inference._types.CohereServiceType:
      type: string
      enum:
      - cohere
    inference._types.CohereServiceSettings:
      type: object
      properties:
        api_key:
          externalDocs:
            url: https://dashboard.cohere.com/api-keys
          description: |-
            A valid API key for your Cohere account.
            You can find or create your Cohere API keys on the Cohere API key settings page.

            IMPORTANT: You need to provide the API key only once, during the inference model creation.
            The get inference endpoint API does not retrieve your API key.
          type: string
        embedding_type:
          description: |-
            For a `text_embedding` task, the types of embeddings you want to get back.
            Use `binary` for binary embeddings, which are encoded as bytes with signed int8 precision.
            Use `bit` for binary embeddings, which are encoded as bytes with signed int8 precision (this is a synonym of `binary`).
            Use `byte` for signed int8 embeddings (this is a synonym of `int8`).
            Use `float` for the default float embeddings.
            Use `int8` for signed int8 embeddings.
          default: float
          allOf:
          - "$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.

            * For the available `completion` models, refer to the [Cohere command docs](https://docs.cohere.com/docs/models#command).
            * For the available `rerank` models, refer to the [Cohere rerank docs](https://docs.cohere.com/reference/rerank-1).
            * For the available `text_embedding` models, refer to [Cohere embed docs](https://docs.cohere.com/reference/embed).
          type: string
        rate_limit:
          description: |-
            This setting helps to minimize the number of rate limit errors returned from Cohere.
            By default, the `cohere` service sets the number of requests allowed per minute to 10000.
          allOf:
          - "$ref": "#/components/schemas/inference._types.RateLimitSetting"
        similarity:
          description: |-
            The similarity measure.
            If the `embedding_type` is `float`, the default value is `dot_product`.
            If the `embedding_type` is `int8` or `byte`, the default value is `cosine`.
          allOf:
          - "$ref": "#/components/schemas/inference._types.CohereSimilarityType"
      required:
      - api_key
      - model_id
    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:
        input_type:
          description: |-
            For a `text_embedding` task, the type of input passed to the model.
            Valid values are:

            * `classification`: Use it for embeddings passed through a text classifier.
            * `clustering`: Use it for the embeddings run through a clustering algorithm.
            * `ingest`: Use it for storing document embeddings in a vector database.
            * `search`: Use it for storing embeddings of search queries run against a vector database to find relevant documents.

            IMPORTANT: The `input_type` field is required when using embedding models `v3` and higher.
          allOf:
          - "$ref": "#/components/schemas/inference._types.CohereInputType"
        return_documents:
          description: For a `rerank` task, return doc text within the results.
          type: boolean
        top_n:
          description: |-
            For a `rerank` task, the number of most relevant documents to return.
            It defaults to the number of the documents.
            If 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
        truncate:
          description: |-
            For a `text_embedding` task, the method to handle inputs longer than the maximum token length.
            Valid values are:

            * `END`: When the input exceeds the maximum input token length, the end of the input is discarded.
            * `NONE`: When the input exceeds the maximum input token length, an error is returned.
            * `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:
      - input_type
    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"
      - 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
    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:
        api_key:
          description: |-
            A valid API key for your Contexutual AI account.

            IMPORTANT: You need to provide the API key only once, during the inference model creation.
            The get inference endpoint API does not retrieve your API key.
          type: string
        model_id:
          description: |-
            The name of the model to use for the inference task.
            Refer to the Contextual AI documentation for the list of available rerank models.
          type: string
        rate_limit:
          description: |-
            This setting helps to minimize the number of rate limit errors returned from Contextual AI.
            The `contextualai` service sets a default number of requests allowed per minute depending on the task type.
            For `rerank`, it is set to `1000`.
          allOf:
          - "$ref": "#/components/schemas/inference._types.RateLimitSetting"
      required:
      - api_key
      - model_id
    inference._types.ContextualAITaskSettings:
      type: object
      properties:
        instruction:
          description: |-
            Instructions for the reranking model. Refer to <https://docs.contextual.ai/api-reference/rerank/rerank#body-instruction>
            Only for the `rerank` task type.
          type: string
        return_documents:
          description: |-
            Whether to return the source documents in the response.
            Only for the `rerank` task type.
          default: false
          type: boolean
        top_k:
          description: |-
            The number of most relevant documents to return.
            If not specified, the reranking results of all documents will be returned.
            Only for the `rerank` task type.
          type: number
    inference._types.InferenceEndpointInfoContextualAi:
      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.TaskTypeContextualAI"
        required:
        - inference_id
        - task_type
    inference._types.CustomTaskType:
      type: string
      enum:
      - text_embedding
      - sparse_embedding
      - rerank
      - completion
    inference._types.CustomServiceType:
      type: string
      enum:
      - custom
    inference._types.CustomServiceSettings:
      type: object
      properties:
        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.
            The batch size is the maximum number of inputs in a single request to the upstream service.
            The chunk within the batch are controlled by the selected chunking strategy for the semantic_text field.
          type: number
        headers:
          description: |-
            Specifies the HTTP header parameters – such as `Authentication` or `Content-Type` – that are required to access the custom service.
            For example:
            ```
            "headers":{
              "Authorization": "Bearer ${api_key}",
              "Content-Type": "application/json;charset=utf-8"
            }
            ```
          type: object
        input_type:
          description: |-
            Specifies the input type translation values that are used to replace the `${input_type}` template in the request body.
            For example:
            ```
            "input_type": {
              "translation": {
                "ingest": "do_ingest",
                "search": "do_search"
              },
              "default": "a_default"
            },
            ```
            If the subsequent inference requests come from a search context, the `search` key will be used and the template will be replaced with `do_search`.
            If 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.
            `translation` can be:
            * `classification`
            * `clustering`
            * `ingest`
            * `search`
          type: object
        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.
            For example:
            ```
            "query_parameters":[
              ["param_key", "some_value"],
              ["param_key", "another_value"],
              ["other_key", "other_value"]
            ]
            ```
            If the base url is `https://www.elastic.co` it results in: `https://www.elastic.co?param_key=some_value&param_key=another_value&other_key=other_value`.
          type: object
        request:
          description: The request configuration object.
          allOf:
          - "$ref": "#/components/schemas/inference._types.CustomRequestParams"
        response:
          description: The response configuration object.
          allOf:
          - "$ref": "#/components/schemas/inference._types.CustomResponseParams"
        secret_parameters:
          description: |-
            Specifies secret parameters, like `api_key` or `api_token`, that are required to access the custom service.
            For example:
            ```
            "secret_parameters":{
              "api_key":"<api_key>"
            }
            ```
          type: object
        url:
          description: The URL endpoint to use for the requests.
          type: string
      required:
      - request
      - response
      - secret_parameters
    inference._types.CustomRequestParams:
      type: object
      properties:
        content:
          description: |-
            The body structure of the request. It requires passing in the string-escaped result of the JSON format HTTP request body.
            For example:
            ```
            "request": "{\"input\":${input}}"
            ```
            > info
            > The content string needs to be a single line except when using the Kibana console.
          type: string
      required:
      - content
    inference._types.CustomResponseParams:
      type: object
      properties:
        json_parser:
          description: |-
            Specifies the JSON parser that is used to parse the response from the custom service.
            Different task types require different json_parser parameters.
            For example:
            ```
            # text_embedding
            # For a response like this:

            {
             "object": "list",
             "data": [
                 {
                   "object": "embedding",
                   "index": 0,
                   "embedding": [
                       0.014539449,
                       -0.015288644
                   ]
                 }
             ],
             "model": "text-embedding-ada-002-v2",
             "usage": {
                 "prompt_tokens": 8,
                 "total_tokens": 8
             }
            }

            # the json_parser definition should look like this:

            "response":{
              "json_parser":{
                "text_embeddings":"$.data[*].embedding[*]"
              }
            }

            # Elasticsearch supports the following embedding types:
            * float
            * byte
            * bit (or binary)

            To specify the embedding type for the response, the `embedding_type`
            field should be added in the `json_parser` object. Here's an example:
            "response":{
              "json_parser":{
                "text_embeddings":"$.data[*].embedding[*]",
                "embedding_type":"bit"
              }
            }

            If `embedding_type` is not specified, it defaults to `float`.

            # sparse_embedding
            # For a response like this:

            {
              "request_id": "75C50B5B-E79E-4930-****-F48DBB392231",
              "latency": 22,
              "usage": {
                 "token_count": 11
              },
              "result": {
                 "sparse_embeddings": [
                    {
                      "index": 0,
                      "embedding": [
                        {
                          "token_id": 6,
                          "weight": 0.101
                        },
                        {
                          "token_id": 163040,
                          "weight": 0.28417
                        }
                      ]
                    }
                 ]
              }
            }

            # the json_parser definition should look like this:

            "response":{
              "json_parser":{
                "token_path":"$.result.sparse_embeddings[*].embedding[*].token_id",
                "weight_path":"$.result.sparse_embeddings[*].embedding[*].weight"
              }
            }

            # rerank
            # For a response like this:

            {
              "results": [
                {
                  "index": 3,
                  "relevance_score": 0.999071,
                  "document": "abc"
                },
                {
                  "index": 4,
                  "relevance_score": 0.7867867,
                  "document": "123"
                },
                {
                  "index": 0,
                  "relevance_score": 0.32713068,
                  "document": "super"
                }
              ],
            }

            # the json_parser definition should look like this:

            "response":{
              "json_parser":{
                "reranked_index":"$.result.scores[*].index",    // optional
                "relevance_score":"$.result.scores[*].score",
                "document_text":"xxx"    // optional
              }
            }

            # completion
            # For a response like this:

            {
             "id": "chatcmpl-B9MBs8CjcvOU2jLn4n570S5qMJKcT",
             "object": "chat.completion",
             "created": 1741569952,
             "model": "gpt-4.1-2025-04-14",
             "choices": [
               {
                "index": 0,
                "message": {
                  "role": "assistant",
                  "content": "Hello! How can I assist you today?",
                  "refusal": null,
                  "annotations": []
                },
                "logprobs": null,
                "finish_reason": "stop"
              }
             ]
            }

            # the json_parser definition should look like this:

            "response":{
              "json_parser":{
                "completion_result":"$.choices[*].message.content"
              }
            }
          type: object
      required:
      - json_parser
    inference._types.CustomTaskSettings:
      type: object
      properties:
        parameters:
          description: |-
            Specifies parameters that are required to run the custom service. The parameters depend on the model your custom service uses.
            For example:
            ```
            "task_settings":{
              "parameters":{
                "input_type":"query",
                "return_token":true
              }
            }
            ```
          type: object
    inference._types.InferenceEndpointInfoCustom:
      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.TaskTypeCustom"
        required:
        - inference_id
        - task_type
    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:
        api_key:
          externalDocs:
            url: https://api-docs.deepseek.com/
          description: |-
            A valid API key for your DeepSeek account.
            You can find or create your DeepSeek API keys on the DeepSeek API key page.

            IMPORTANT: You need to provide the API key only once, during the inference model creation.
            The get inference endpoint API does not retrieve your API key.
          type: string
        model_id:
          description: |-
            For a `completion` or `chat_completion` task, the name of the model to use for the inference task.

            For the available `completion` and `chat_completion` models, refer to the [DeepSeek Models & Pricing docs](https://api-docs.deepseek.com/quick_start/pricing).
          type: string
        url:
          description: The URL endpoint to use for the requests. Defaults to `https://api.deepseek.com/chat/completions`.
          type: string
      required:
      - api_key
      - model_id
    inference._types.InferenceEndpointInfoDeepSeek:
      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.TaskTypeDeepSeek"
        required:
        - inference_id
        - task_type
    inference._types.ElasticsearchTaskType:
      type: string
      enum:
      - rerank
      - sparse_embedding
      - text_embedding
    inference._types.ElasticsearchServiceType:
      type: string
      enum:
      - elasticsearch
    inference._types.ElasticsearchServiceSettings:
      type: object
      properties:
        adaptive_allocations:
          description: |-
            Adaptive allocations configuration details.
            If `enabled` is true, the number of allocations of the model is set based on the current load the process gets.
            When the load is high, a new model allocation is automatically created, respecting the value of `max_number_of_allocations` if it's set.
            When the load is low, a model allocation is automatically removed, respecting the value of `min_number_of_allocations` if it's set.
            If `enabled` is true, do not set the number of allocations manually.
          allOf:
          - "$ref": "#/components/schemas/inference._types.AdaptiveAllocations"
        deployment_id:
          description: |-
            The deployment identifier for a trained model deployment.
            When `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.
            It 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.
            Increasing this value generally increases the throughput.
            If adaptive allocations are enabled, do not set this value because it's automatically set.
          type: number
        num_threads:
          description: |-
            The number of threads used by each model allocation during inference.
            This setting generally increases the speed per inference request.
            The inference process is a compute-bound process; `threads_per_allocations` must not exceed the number of available allocated processors per node.
            The value must be a power of 2.
            The maximum value is 32.
          type: number
        long_document_strategy:
          description: |-
            Available only for the `rerank` task type using the Elastic reranker model.
            Controls the strategy used for processing long documents during inference.

            Possible values:
            - `truncate` (default): Processes only the beginning of each document.
            - `chunk`: Splits long documents into smaller parts (chunks) before inference.

            When `long_document_strategy` is set to `chunk`, Elasticsearch splits each document into smaller parts but still returns a single score per document.
            That score reflects the highest relevance score among all chunks.
          x-state: Technical preview
          type: string
        max_chunks_per_doc:
          description: |-
            Only for the `rerank` task type.
            Limits the number of chunks per document that are sent for inference when chunking is enabled.
            If not set, all chunks generated for the document are processed.
          x-state: Technical preview
          type: number
      required:
      - model_id
      - num_threads
    inference._types.AdaptiveAllocations:
      type: object
      properties:
        enabled:
          description: Turn on `adaptive_allocations`.
          default: false
          type: boolean
        max_number_of_allocations:
          description: |-
            The maximum number of allocations to scale to.
            If 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.
            If set, it must be greater than or equal to 0.
            If not defined, the deployment scales to 0.
          type: number
    inference._types.ElasticsearchTaskSettings:
      type: object
      properties:
        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"
      - 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
    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:
      type: object
      properties:
        adaptive_allocations:
          description: |-
            Adaptive allocations configuration details.
            If `enabled` is true, the number of allocations of the model is set based on the current load the process gets.
            When the load is high, a new model allocation is automatically created, respecting the value of `max_number_of_allocations` if it's set.
            When the load is low, a model allocation is automatically removed, respecting the value of `min_number_of_allocations` if it's set.
            If `enabled` is true, do not set the number of allocations manually.
          allOf:
          - "$ref": "#/components/schemas/inference._types.AdaptiveAllocations"
        num_allocations:
          description: |-
            The total number of allocations this model is assigned across machine learning nodes.
            Increasing this value generally increases the throughput.
            If adaptive allocations is enabled, do not set this value because it's automatically set.
          type: number
        num_threads:
          description: |-
            The number of threads used by each model allocation during inference.
            Increasing this value generally increases the speed per inference request.
            The inference process is a compute-bound process; `threads_per_allocations` must not exceed the number of available allocated processors per node.
            The value must be a power of 2.
            The maximum value is 32.

            > info
            > 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"
      - 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
        model_id:
          externalDocs:
            url: https://ai.google.dev/gemini-api/docs/models
          description: |-
            The name of the model to use for the inference task.
            Refer to the Google documentation for the list of supported models.
          type: string
        rate_limit:
          description: |-
            This setting helps to minimize the number of rate limit errors returned from Google AI Studio.
            By default, the `googleaistudio` service sets the number of requests allowed per minute to 360.
          allOf:
          - "$ref": "#/components/schemas/inference._types.RateLimitSetting"
      required:
      - api_key
      - model_id
    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:
      - 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:
      type: object
      properties:
        provider:
          description: |-
            The name of the Google Model Garden Provider for `completion` and `chat_completion` tasks.
            In order for a Google Model Garden endpoint to be used `provider` must be defined and be other than `google`.
            Modes:
            - Google Model Garden (third-party models): set `provider` to a supported non-`google` value and provide `url` and/or `streaming_url`.
            - 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"
        url:
          description: |-
            The URL for non-streaming `completion` requests to a Google Model Garden provider endpoint.
            If both `url` and `streaming_url` are provided, each is used for its respective mode.
            If `streaming_url` is not provided, `url` is also used for streaming `completion` and `chat_completion`.
            If `provider` is not provided or set to `google` (Google Vertex AI), do not set `url` (or `streaming_url`).
            At least one of `url` or `streaming_url` must be provided for Google Model Garden endpoint usage.
            Certain 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).
            Information 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
        streaming_url:
          description: |-
            The URL for streaming `completion` and `chat_completion` requests to a Google Model Garden provider endpoint.
            If both `streaming_url` and `url` are provided, each is used for its respective mode.
            If `url` is not provided, `streaming_url` is also used for non-streaming `completion` requests.
            If `provider` is not provided or set to `google` (Google Vertex AI), do not set `streaming_url` (or `url`).
            At least one of `streaming_url` or `url` must be provided for Google Model Garden endpoint usage.
            Certain 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).
            Information 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
        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.
            For Google Vertex AI, when `provider` is omitted or `google` `location` is mandatory.
            For Google Model Garden's `completion` and `chat_completion` tasks, when `provider` is a supported non-`google` value - `location` is ignored.
            Refer to the Google documentation for the list of supported locations.
          type: string
        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.
            For Google Vertex AI `model_id` is mandatory.
            For 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.
            Refer to the Google documentation for the list of supported models for Google Vertex AI.
          type: string
        project_id:
          description: |-
            The name of the project to use for the Google Vertex AI inference task.
            For Google Vertex AI `project_id` is mandatory.
            For Google Model Garden's `completion` and `chat_completion` tasks, when `provider` is a supported non-`google` value - `project_id` is ignored.
          type: string
        rate_limit:
          description: |-
            This setting helps to minimize the number of rate limit errors returned from Google Vertex AI.
            By default, the `googlevertexai` service sets the number of requests allowed per minute to 30.000.
          allOf:
          - "$ref": "#/components/schemas/inference._types.RateLimitSetting"
        service_account_json:
          description: A valid service account in JSON format for the Google Vertex
            AI API.
          type: string
        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.
            By default, the model's standard output dimension is used.
            Refer to the Google documentation for more information.
          type: number
        max_batch_size:
          description: |-
            Only applicable for the `text_embedding` task type.
            Controls the batch size of chunked inference requests sent to Google Vertex AI.

            Setting 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.

            To estimate a safe `max_batch_size` value, you can use it together with the `max_chunk_size` parameter using the following formula:
            `max_batch_size ≈ max_chunk_size × 1.3 × 512 ÷ 20000`

            Where:
            - `1.3` is an approximate tokens-per-word ratio
            - `512` is the maximum number of chunks that can be generated per document
            - `20000` is the Google Vertex AI token limit per request

            This estimate assumes the worst-case scenario with a document generating the maximum 512 chunks.
          default: 250
          type: number
      required:
      - service_account_json
    inference._types.GoogleModelGardenProvider:
      type: string
      enum:
      - google
      - anthropic
      - meta
      - hugging_face
      - mistral
      - ai21
    inference._types.GoogleVertexAITaskSettings:
      type: object
      properties:
        auto_truncate:
          description: For a `text_embedding` task, truncate inputs longer than the
            maximum token length automatically.
          type: boolean
        top_n:
          description: For a `rerank` task, the number of the top N documents that
            should be returned.
          type: number
        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.
            Refer to the Google documentation for the allowable configurations for each model type.
          allOf:
          - "$ref": "#/components/schemas/inference._types.ThinkingConfig"
        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.
            If `provider` is not set to `anthropic`, this field is ignored.
            If `max_tokens` is specified - it must be a positive integer. If not specified, the default value of 1024 is used.
            Anthropic models require `max_tokens` to be set for each request. Please refer to the Anthropic documentation for more information.
          type: number
    inference._types.ThinkingConfig:
      type: object
      properties:
        thinking_budget:
          description: Indicates the desired thinking budget in tokens.
          type: number
    inference._types.InferenceEndpointInfoGoogleVertexAI:
      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.TaskTypeGoogleVertexAI"
        required:
        - inference_id
        - task_type
    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:
        model_id:
          externalDocs:
            url: https://console.groq.com/docs/models
          description: |-
            The name of the model to use for the inference task.
            Refer to the Groq model documentation for the list of supported models and versions.
            Service has been tested and confirmed to be working for `completion` and `chat_completion` tasks with the following models:
            * `llama-3.3-70b-versatile`
          type: string
        api_key:
          description: |-
            A valid API key for accessing Groq API.

            IMPORTANT: You need to provide the API key only once, during the inference model creation.
            The get inference endpoint API does not retrieve your API key.
          type: string
        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.
            By 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"
      required:
      - model_id
    inference._types.InferenceEndpointInfoGroq:
      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.TaskTypeGroq"
        required:
        - inference_id
        - task_type
    inference._types.TaskTypeGroq:
      type: string
      enum:
      - chat_completion
    inference._types.HuggingFaceTaskType:
      type: string
      enum:
      - chat_completion
      - completion
      - rerank
      - text_embedding
    inference._types.HuggingFaceServiceType:
      type: string
      enum:
      - hugging_face
    inference._types.HuggingFaceServiceSettings:
      type: object
      properties:
        api_key:
          externalDocs:
            url: https://huggingface.co/settings/tokens
          description: |-
            A valid access token for your HuggingFace account.
            You can create or find your access tokens on the HuggingFace settings page.

            IMPORTANT: You need to provide the API key only once, during the inference model creation.
            The get inference endpoint API does not retrieve your API key.
          type: string
        rate_limit:
          description: |-
            This setting helps to minimize the number of rate limit errors returned from Hugging Face.
            By default, the `hugging_face` service sets the number of requests allowed per minute to 3000 for all supported tasks.
            Hugging Face does not publish a universal rate limit — actual limits may vary.
            It is recommended to adjust this value based on the capacity and limits of your specific deployment environment.
          allOf:
          - "$ref": "#/components/schemas/inference._types.RateLimitSetting"
        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.
            For `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`.
            If 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
        model_id:
          description: |-
            The name of the HuggingFace model to use for the inference task.
            For `completion` and `chat_completion` tasks, this field is optional but may be required for certain models — particularly when using serverless inference endpoints.
            For the `text_embedding` task, this field should not be included. Otherwise, the request will fail.
          type: string
      required:
      - api_key
      - url
    inference._types.HuggingFaceTaskSettings:
      type: object
      properties:
        return_documents:
          description: For a `rerank` task, return doc text within the results.
          type: boolean
        top_n:
          description: |-
            For a `rerank` task, the number of most relevant documents to return.
            It defaults to the number of the documents.
          type: number
    inference._types.InferenceEndpointInfoHuggingFace:
      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.TaskTypeHuggingFace"
        required:
        - inference_id
        - task_type
    inference._types.TaskTypeHuggingFace:
      type: string
      enum:
      - chat_completion
      - completion
      - rerank
      - text_embedding
    inference._types.JinaAITaskType:
      type: string
      enum:
      - embedding
      - rerank
      - text_embedding
    inference._types.JinaAIServiceType:
      type: string
      enum:
      - jinaai
    inference._types.JinaAIServiceSettings:
      type: object
      properties:
        api_key:
          externalDocs:
            url: https://jina.ai/embeddings/
          description: |-
            A valid API key of your JinaAI account.

            IMPORTANT: You need to provide the API key only once, during the inference model creation.
            The get inference endpoint API does not retrieve your API key.
          type: string
        model_id:
          description: The name of the model to use for the inference task.
          type: string
        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.
            By 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"
        similarity:
          description: |-
            For an `embedding` or `text_embedding` task, the similarity measure. One of cosine, dot_product, l2_norm.
            The default values varies with the embedding type.
            For example, a float embedding type uses a `dot_product` similarity measure by default.
          allOf:
          - "$ref": "#/components/schemas/inference._types.JinaAISimilarityType"
        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.
            By default, the model's standard output dimension is used.
            Refer to the Jina documentation for more information.
          type: number
        element_type:
          description: |-
            For an `embedding` or `text_embedding` task, the data type returned by the model.
            Use `bit` for binary embeddings, which are encoded as bytes with signed int8 precision.
            Use `binary` for binary embeddings, which are encoded as bytes with signed int8 precision (this is a synonym of `bit`).
            Use `float` for the default float embeddings.
          default: float
          allOf:
          - "$ref": "#/components/schemas/inference._types.JinaAIElementType"
        multimodal_model:
          description: |-
            For the `embedding` task, whether the model supports multimodal inputs. If true, requests sent to the Jina model
            will use the multimodal request format (a list of objects). If false, requests sent to the model will use the same
            format as the `text_embedding` task (a list of strings). Setting this to `false` allows the `embedding` task to be
            used with models that do not support multimodal requests.
          default: true
          type: boolean
      required:
      - api_key
      - model_id
    inference._types.JinaAISimilarityType:
      type: string
      enum:
      - cosine
      - dot_product
      - l2_norm
    inference._types.JinaAIElementType:
      type: string
      enum:
      - binary
      - bit
      - float
    inference._types.JinaAITaskSettings:
      type: object
      properties:
        return_documents:
          description: For a `rerank` task, return the doc text within the results.
          type: boolean
        input_type:
          description: |-
            For an `embedding` or `text_embedding` task, the task passed to the model.
            Valid values are:

            * `classification`: Use it for embeddings passed through a classifier.
            * `clustering`: Use it for the embeddings run through a clustering algorithm.
            * `ingest`: Use it for storing document embeddings in a vector database.
            * `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"
        late_chunking:
          description: |-
            For an `embedding` or `text_embedding` task, controls when text is split into chunks.
            When 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.

            If 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.

            If not specified, defaults to `false`.
          type: boolean
        top_n:
          description: |-
            For a `rerank` task, the number of most relevant documents to return.
            It defaults to the number of the documents.
            If 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"
      - type: object
        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
    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:
        url:
          description: |-
            The URL endpoint of the Llama stack endpoint.
            URL must contain:
            * For `text_embedding` task - `/v1/inference/embeddings`.
            * For `completion` and `chat_completion` tasks - `/v1/openai/v1/chat/completions`.
          type: string
        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.
            Refer to the Llama downloading models documentation for different ways of getting a list of available models and downloading them.
            Service has been tested and confirmed to be working with the following models:
            * For `text_embedding` task - `all-MiniLM-L6-v2`.
            * For `completion` and `chat_completion` tasks - `llama3.2:3b`.
          type: string
        max_input_tokens:
          description: For a `text_embedding` task, the maximum number of tokens per
            input before chunking occurs.
          type: number
        similarity:
          description: For a `text_embedding` task, the similarity measure. One of
            cosine, dot_product, l2_norm.
          allOf:
          - "$ref": "#/components/schemas/inference._types.LlamaSimilarityType"
        rate_limit:
          description: |-
            This setting helps to minimize the number of rate limit errors returned from the Llama API.
            By default, the `llama` service sets the number of requests allowed per minute to 3000.
          allOf:
          - "$ref": "#/components/schemas/inference._types.RateLimitSetting"
      required:
      - url
      - model_id
    inference._types.LlamaSimilarityType:
      type: string
      enum:
      - cosine
      - dot_product
      - l2_norm
    inference._types.InferenceEndpointInfoLlama:
      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.TaskTypeLlama"
        required:
        - inference_id
        - task_type
    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:
        api_key:
          externalDocs:
            url: https://console.mistral.ai/api-keys/
          description: |-
            A valid API key of your Mistral account.
            You can find your Mistral API keys or you can create a new one on the API Keys page.

            IMPORTANT: You need to provide the API key only once, during the inference model creation.
            The get inference endpoint API does not retrieve your API key.
          type: string
        max_input_tokens:
          description: The maximum number of tokens per input before chunking occurs.
          type: number
        model:
          externalDocs:
            url: https://docs.mistral.ai/getting-started/models/
          description: |-
            The name of the model to use for the inference task.
            Refer 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.
            By default, the `mistral` service sets the number of requests allowed per minute to 240.
          allOf:
          - "$ref": "#/components/schemas/inference._types.RateLimitSetting"
      required:
      - api_key
      - model
    inference._types.InferenceEndpointInfoMistral:
      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.TaskTypeMistral"
        required:
        - inference_id
        - task_type
    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:
        api_key:
          description: |-
            A valid API key for your Nvidia endpoint.
            Can be found in `API Keys` section of Nvidia account settings.
          type: string
        url:
          description: |-
            The URL of the Nvidia model endpoint. If not provided, the default endpoint URL is used depending on the task type:

            * For `text_embedding` task - `https://integrate.api.nvidia.com/v1/embeddings`.
            * For `completion` and `chat_completion` tasks - `https://integrate.api.nvidia.com/v1/chat/completions`.
            * For `rerank` task - `https://ai.api.nvidia.com/v1/retrieval/nvidia/reranking`.
          type: string
        model_id:
          description: |-
            The name of the model to use for the inference task.
            Refer to the model's documentation for the name if needed.
            Service has been tested and confirmed to be working with the following models:

            * For `text_embedding` task - `nvidia/llama-3.2-nv-embedqa-1b-v2`.
            * For `completion` and `chat_completion` tasks - `microsoft/phi-3-mini-128k-instruct`.
            * For `rerank` task - `nv-rerank-qa-mistral-4b:1`.
            Service doesn't support `text_embedding` task `baai/bge-m3` and `nvidia/nvclip` models due to them not recognizing the `input_type` parameter.
          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
        similarity:
          description: For a `text_embedding` task, the similarity measure. One of
            cosine, dot_product, l2_norm.
          allOf:
          - "$ref": "#/components/schemas/inference._types.NvidiaSimilarityType"
        rate_limit:
          description: |-
            This setting helps to minimize the number of rate limit errors returned from the Nvidia API.
            By default, the `nvidia` service sets the number of requests allowed per minute to 3000.
          allOf:
          - "$ref": "#/components/schemas/inference._types.RateLimitSetting"
      required:
      - api_key
      - model_id
    inference._types.NvidiaSimilarityType:
      type: string
      enum:
      - cosine
      - dot_product
      - l2_norm
    inference._types.NvidiaTaskSettings:
      type: object
      properties:
        input_type:
          description: |-
            For a `text_embedding` task, type of input sent to the Nvidia endpoint.
            Valid values are:

            * `ingest`: Mapped to Nvidia's `passage` value in request. Used when generating embeddings during indexing.
            * `search`: Mapped to Nvidia's `query` value in request. Used when generating embeddings during querying.

            IMPORTANT: For Nvidia endpoints, if the `input_type` field is not specified, it defaults to `query`.
          allOf:
          - "$ref": "#/components/schemas/inference._types.NvidiaInputType"
        truncate:
          description: |-
            For a `text_embedding` task, the method used by the Nvidia model to handle inputs longer than the maximum token length.
            Valid values are:

            * `END`: When the input exceeds the maximum input token length, the end of the input is discarded.
            * `NONE`: When the input exceeds the maximum input token length, an error is returned.
            * `START`: When the input exceeds the maximum input token length, the start of the input is discarded.
          allOf:
          - "$ref": "#/components/schemas/inference._types.CohereTruncateType"
    inference._types.NvidiaInputType:
      type: string
      enum:
      - ingest
      - search
    inference._types.InferenceEndpointInfoNvidia:
      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.TaskTypeNvidia"
        required:
        - inference_id
        - task_type
    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:
        api_key:
          externalDocs:
            url: https://platform.openai.com/api-keys
          description: |-
            A valid API key of your OpenAI account.
            You can find your OpenAI API keys in your OpenAI account under the API keys section.

            IMPORTANT: You need to provide the API key only once, during the inference model creation.
            The get inference endpoint API does not retrieve your API key.
          type: string
        dimensions:
          description: |-
            The number of dimensions the resulting output embeddings should have.
            It is supported only in `text-embedding-3` and later models.
            If 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.
            Refer to the OpenAI documentation for the list of available text embedding models.
          type: string
        organization_id:
          description: |-
            The unique identifier for your organization.
            You can find the Organization ID in your OpenAI account under *Settings > Organizations*.
          type: string
        rate_limit:
          description: |-
            This setting helps to minimize the number of rate limit errors returned from OpenAI.
            The `openai` service sets a default number of requests allowed per minute depending on the task type.
            For `text_embedding`, it is set to `3000`.
            For `completion`, it is set to `500`.
          allOf:
          - "$ref": "#/components/schemas/inference._types.RateLimitSetting"
        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"
        url:
          description: |-
            The URL endpoint to use for the requests.
            It can be changed for testing purposes.
          default: https://api.openai.com/v1/embeddings.
          type: string
      required:
      - api_key
      - model_id
    inference._types.OpenAISimilarityType:
      type: string
      enum:
      - cosine
      - dot_product
      - l2_norm
    inference._types.OpenAITaskSettings:
      type: object
      properties:
        user:
          description: |-
            For a `completion` or `text_embedding` task, specify the user issuing the request.
            This information can be used for abuse detection.
          type: string
        headers:
          description: |-
            Specifies custom HTTP header parameters.
            For example:
            ```
            "headers":{
              "Custom-Header": "Some-Value",
              "Another-Custom-Header": "Another-Value"
            }
            ```
          type: object
    inference._types.InferenceEndpointInfoOpenAI:
      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.TaskTypeOpenAI"
        required:
        - inference_id
        - task_type
    inference._types.TaskTypeOpenAI:
      type: string
      enum:
      - text_embedding
      - chat_completion
      - completion
    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:
        api_key:
          description: |-
            A valid API key for your OpenShift AI endpoint.
            Can be found in `Token authentication` section of model related information.
          type: string
        url:
          description: The URL of the OpenShift AI hosted model endpoint.
          type: string
        model_id:
          description: |-
            The name of the model to use for the inference task.
            Refer to the hosted model's documentation for the name if needed.
            Service has been tested and confirmed to be working with the following models:
            * For `text_embedding` task - `gritlm-7b`.
            * For `completion` and `chat_completion` tasks - `llama-31-8b-instruct`.
            * For `rerank` task - `bge-reranker-v2-m3`.
          type: string
        max_input_tokens:
          description: For a `text_embedding` task, the maximum number of tokens per
            input before chunking occurs.
          type: number
        similarity:
          description: |-
            For a `text_embedding` task, the similarity measure. One of cosine, dot_product, l2_norm.
            If not specified, the default dot_product value is used.
          allOf:
          - "$ref": "#/components/schemas/inference._types.OpenShiftAiSimilarityType"
        rate_limit:
          description: |-
            This setting helps to minimize the number of rate limit errors returned from the OpenShift AI API.
            By default, the `openshift_ai` service sets the number of requests allowed per minute to 3000.
          allOf:
          - "$ref": "#/components/schemas/inference._types.RateLimitSetting"
      required:
      - api_key
      - url
    inference._types.OpenShiftAiSimilarityType:
      type: string
      enum:
      - cosine
      - dot_product
      - l2_norm
    inference._types.OpenShiftAiTaskSettings:
      type: object
      properties:
        return_documents:
          description: For a `rerank` task, whether to return the source documents
            in the response.
          type: boolean
        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
    inference._types.TaskTypeOpenShiftAi:
      type: string
      enum:
      - text_embedding
      - chat_completion
      - completion
      - rerank
    inference._types.VoyageAITaskType:
      type: string
      enum:
      - text_embedding
      - rerank
    inference._types.VoyageAIServiceType:
      type: string
      enum:
      - voyageai
    inference._types.VoyageAIServiceSettings:
      type: object
      properties:
        dimensions:
          externalDocs:
            url: https://docs.voyageai.com/docs/embeddings
          description: |-
            The number of dimensions for resulting output embeddings.
            This setting maps to `output_dimension` in the VoyageAI documentation.
            Only 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.
            Refer to the VoyageAI documentation for the list of available text embedding and rerank models.
          type: string
        rate_limit:
          description: |-
            This setting helps to minimize the number of rate limit errors returned from VoyageAI.
            The `voyageai` service sets a default number of requests allowed per minute depending on the task type.
            For both `text_embedding` and `rerank`, it is set to `2000`.
          allOf:
          - "$ref": "#/components/schemas/inference._types.RateLimitSetting"
        embedding_type:
          externalDocs:
            url: https://docs.voyageai.com/docs/embeddings
          description: |-
            The data type for the embeddings to be returned.
            This setting maps to `output_dtype` in the VoyageAI documentation.
            Permitted values: float, int8, bit.
            `int8` is a synonym of `byte` in the VoyageAI documentation.
            `bit` is a synonym of `binary` in the VoyageAI documentation.
            Only for the `text_embedding` task type.
          type: number
      required:
      - model_id
    inference._types.VoyageAITaskSettings:
      type: object
      properties:
        input_type:
          description: |-
            Type of the input text.
            Permitted values: `ingest` (maps to `document` in the VoyageAI documentation), `search` (maps to `query` in the VoyageAI documentation).
            Only for the `text_embedding` task type.
          type: string
        return_documents:
          description: |-
            Whether to return the source documents in the response.
            Only for the `rerank` task type.
          default: false
          type: boolean
        top_k:
          description: |-
            The number of most relevant documents to return.
            If not specified, the reranking results of all documents will be returned.
            Only for the `rerank` task type.
          type: number
        truncation:
          description: Whether to truncate the input texts to fit within the context
            length.
          default: true
          type: boolean
    inference._types.InferenceEndpointInfoVoyageAI:
      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.TaskTypeVoyageAI"
        required:
        - inference_id
        - task_type
    inference._types.TaskTypeVoyageAI:
      type: string
      enum:
      - text_embedding
      - rerank
    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:
        api_key:
          externalDocs:
            url: https://cloud.ibm.com/iam/apikeys
          description: |-
            A valid API key of your Watsonx account.
            You can find your Watsonx API keys or you can create a new one on the API keys page.

            IMPORTANT: You need to provide the API key only once, during the inference model creation.
            The get inference endpoint API does not retrieve your 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`.
            For 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.
            Refer to the IBM Embedding Models section in the Watsonx documentation for the list of available text embedding models.
            Refer to the IBM library - Foundation models in Watsonx.ai.
          type: string
        project_id:
          description: The identifier of the IBM Cloud project to use for the inference
            task.
          type: string
        rate_limit:
          description: |-
            This setting helps to minimize the number of rate limit errors returned from Watsonx.
            By 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
    inference._types.InferenceEndpointInfoWatsonx:
      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.TaskTypeWatsonx"
        required:
        - inference_id
        - task_type
    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:
        rerank:
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.RankedDocument"
      required:
      - rerank
    inference._types.SparseEmbeddingInferenceResult:
      description: The response format for the sparse embedding request.
      type: object
      properties:
        sparse_embedding:
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.SparseEmbeddingResult"
      required:
      - sparse_embedding
    inference._types.TextEmbeddingInferenceResult:
      description: TextEmbeddingInferenceResult is an aggregation of mutually exclusive
        text_embedding variants
      type: object
      properties:
        text_embedding_bytes:
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.DenseEmbeddingByteResult"
        text_embedding_bits:
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.DenseEmbeddingByteResult"
        text_embedding:
          type: array
          items:
            "$ref": "#/components/schemas/inference._types.DenseEmbeddingResult"
      minProperties: 1
      maxProperties: 1
    _types.ElasticsearchVersionInfo:
      type: object
      properties:
        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
        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.
            For example, `docker`, `rpm`, or `tar`.
          type: string
        lucene_version:
          description: The version number of Elasticsearch's underlying Lucene software.
          allOf:
          - "$ref": "#/components/schemas/_types.VersionString"
        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.
            Also the minimum version from which you can perform a rolling upgrade.
          allOf:
          - "$ref": "#/components/schemas/_types.VersionString"
        number:
          description: |-
            The Elasticsearch version number.

            ::: IMPORTANT: For Serverless deployments, this static value is always `8.11.0` and is used solely for backward compatibility with legacy clients.
             Serverless environments are versionless and automatically upgraded, so this value can be safely ignored.
          type: string
      required:
      - build_date
      - build_flavor
      - build_hash
      - build_snapshot
      - build_type
      - lucene_version
      - minimum_index_compatibility_version
      - minimum_wire_compatibility_version
      - number
    ingest._types.Pipeline:
      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.
            Processors run sequentially in the order specified.
          type: array
          items:
            "$ref": "#/components/schemas/ingest._types.ProcessorContainer"
        version:
          description: Version number used by external systems to track ingest pipelines.
          allOf:
          - "$ref": "#/components/schemas/_types.VersionNumber"
        deprecated:
          description: |-
            Marks this ingest pipeline as deprecated.
            When 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
          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
          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
          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
          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
          allOf:
          - "$ref": "#/components/schemas/ingest._types.FieldAccessPattern"
    ingest._types.ProcessorContainer:
      type: object
      properties:
        append:
          description: |-
            Appends one or more values to an existing array if the field already exists and it is an array.
            Converts a scalar to an array and appends one or more values to it if the field exists and it is a scalar.
            Creates an array containing the provided values if the field doesn’t exist.
            Accepts a single value or an array of values.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.AppendProcessor"
        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"
        bytes:
          description: |-
            Converts a human readable byte value (for example `1kb`) to its value in bytes (for example `1024`).
            If the field is an array of strings, all members of the array will be converted.
            Supported human readable units are "b", "kb", "mb", "gb", "tb", "pb" case insensitive.
            An error will occur if the field is not a supported format or resultant value exceeds 2^63.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.BytesProcessor"
        cef:
          description: Converts a CEF message into a structured format.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.CefProcessor"
        circle:
          description: Converts circle definitions of shapes to regular polygons which
            approximate them.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.CircleProcessor"
        community_id:
          description: |-
            Computes the Community ID for network flow data as defined in the
            Community ID Specification. You can use a community ID to correlate network
            events related to a single flow.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.CommunityIDProcessor"
        convert:
          description: |-
            Converts a field in the currently ingested document to a different type, such as converting a string to an integer.
            If the field value is an array, all members will be converted.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.ConvertProcessor"
        csv:
          description: |-
            Extracts fields from CSV line out of a single text field within a document.
            Any empty field in CSV will be skipped.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.CsvProcessor"
        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.
            This processor allows fields with dots in the name to be accessible by other processors in the pipeline.
            Otherwise 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.
            This 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.
            This 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
            content 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.
            This 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.
            You choose which field to extract matched fields from, as well as the grok pattern you expect will match.
            A 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.
            If the field is an array of string, all members of the array will be converted.
            If 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.
            If 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.
            Throws an error when the field is not an array.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.JoinProcessor"
        json:
          description: Converts a JSON string into a structured JSON object.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.JsonProcessor"
        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"
        lowercase:
          description: |-
            Converts a string to its lowercase equivalent.
            If the field is an array of strings, all members of the array will be converted.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.LowercaseProcessor"
        network_direction:
          description: |-
            Calculates the network direction given a source IP address, destination IP
            address, and a list of internal networks.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.NetworkDirectionProcessor"
        pipeline:
          description: Executes another pipeline.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.PipelineProcessor"
        redact:
          description: |-
            The Redact processor uses the Grok rules engine to obscure text in the input document matching the given Grok patterns.
            The processor can be used to obscure Personal Identifying Information (PII) by configuring it to detect known patterns such as email or IP addresses.
            Text that matches a Grok pattern is replaced with a configurable string such as `<EMAIL>` where an email address is matched or simply replace all matches with the text `<REDACTED>` if preferred.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.RedactProcessor"
        registered_domain:
          description: |-
            Extracts the registered domain (also known as the effective top-level
            domain or eTLD), sub-domain, and top-level domain from a fully qualified
            domain name (FQDN). Uses the registered domains defined in the Mozilla
            Public Suffix List.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.RegisteredDomainProcessor"
        remove:
          description: |-
            Removes existing fields.
            If one field doesn’t exist, an exception will be thrown.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.RemoveProcessor"
        rename:
          description: |-
            Renames an existing field.
            If the field doesn’t exist or the new name is already used, an exception will be thrown.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.RenameProcessor"
        reroute:
          description: |-
            Routes a document to another target index or data stream.
            When setting the `destination` option, the target is explicitly specified and the dataset and namespace options can’t be set.
            When 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"
        script:
          description: |-
            Runs an inline or stored script on incoming documents.
            The script runs in the `ingest` context.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.ScriptProcessor"
        set:
          description: |-
            Adds a field with the specified value.
            If the field already exists, its value will be replaced with the provided one.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.SetProcessor"
        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"
        sort:
          description: |-
            Sorts the elements of an array ascending or descending.
            Homogeneous arrays of numbers will be sorted numerically, while arrays of strings or heterogeneous arrays of strings + numbers will be sorted lexicographically.
            Throws an error when the field is not an array.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.SortProcessor"
        split:
          description: |-
            Splits a field into an array using a separator character.
            Only works on string fields.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.SplitProcessor"
        terminate:
          description: |-
            Terminates the current ingest pipeline, causing no further processors to be run.
            This will normally be executed conditionally, using the `if` option.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.TerminateProcessor"
        trim:
          description: |-
            Trims whitespace from a field.
            If the field is an array of strings, all members of the array will be trimmed.
            This only works on leading and trailing whitespace.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.TrimProcessor"
        uppercase:
          description: |-
            Converts a string to its uppercase equivalent.
            If the field is an array of strings, all members of the array will be converted.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.UppercaseProcessor"
        urldecode:
          description: |-
            URL-decodes a string.
            If the field is an array of strings, all members of the array will be decoded.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.UrlDecodeProcessor"
        uri_parts:
          description: |-
            Parses a Uniform Resource Identifier (URI) string and extracts its components as an object.
            This 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"
        user_agent:
          description: |-
            The `user_agent` processor extracts details from the user agent string a browser sends with its web requests.
            This processor adds this information by default under the `user_agent` field.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.UserAgentProcessor"
      minProperties: 1
      maxProperties: 1
    ingest._types.AppendProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        properties:
          field:
            description: |-
              The field to be appended to.
              Supports 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`.
              Applies only when value is a template snippet.
              Must 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),
              rather than appending them to the field.
            default: false
            type: boolean
        required:
        - field
    ingest._types.ProcessorBase:
      type: object
      properties:
        description:
          description: |-
            Description of the processor.
            Useful for describing the purpose of the processor or its configuration.
          type: string
        if:
          description: Conditionally execute the processor.
          allOf:
          - "$ref": "#/components/schemas/_types.Script"
        ignore_failure:
          description: Ignore failures for the processor.
          type: boolean
        on_failure:
          description: Handle failures for the processor.
          type: array
          items:
            "$ref": "#/components/schemas/ingest._types.ProcessorContainer"
        tag:
          description: |-
            Identifier for the processor.
            Useful for debugging and metrics.
          type: string
    ingest._types.AttachmentProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - 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.
              Use `-1` for no limit.
            default: 100000
            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.
              Can 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.
              If 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"
      - 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.
              By 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"
      - 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.
              By 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"
      - 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
              By 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"
      - 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
              iana_number field is not present. The following protocol names are currently
              supported: 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
              seed can prevent hash collisions between network domains, such as a staging
              and production network that use the same addressing scheme.
            default: 0
            type: number
          ignore_missing:
            description: |-
              If true and any required fields are missing, the processor quietly exits
              without modifying the document.
            default: true
            type: boolean
    ingest._types.ConvertProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - 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.
              By 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
    ingest._types.ConvertType:
      type: string
      enum:
      - integer
      - long
      - double
      - float
      - boolean
      - ip
      - string
      - auto
    ingest._types.CsvProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        properties:
          empty_value:
            description: |-
              Value used to fill empty fields.
              Empty fields are skipped if this is not provided.
              An 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
    ingest._types.DateProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        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.
              Can 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.
              Supports 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.
              Supports template snippets.
            default: UTC
            type: string
          output_format:
            description: |-
              The format to use when writing the date to target_field. Must be a valid
              java time pattern.
            default: yyyy-MM-dd'T'HH:mm:ss.SSSXXX
            type: string
        required:
        - field
        - formats
    ingest._types.DateIndexNameProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        properties:
          date_formats:
            description: |-
              An array of the expected date formats for parsing dates / timestamps in the document being preprocessed.
              Can 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:
              `y` (year), `M` (month), `w` (week), `d` (day), `h` (hour), `m` (minute) and `s` (second).
              Supports 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.
              A valid java time pattern is expected here.
              Supports 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.
              Supports 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
    ingest._types.DissectProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        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
    ingest._types.DotExpanderProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        properties:
          field:
            description: |-
              The field to expand into an object field.
              If 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.
              When `false`, the processor will merge conflicts by combining the old and the new values into an array.
              When `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.
              Only required if the field to expand is part another object field, because the `field` option can only understand leaf fields.
            type: string
        required:
        - field
    ingest._types.DropProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
    ingest._types.EnrichProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        properties:
          field:
            description: |-
              The field in the input document that matches the policies match_field used to retrieve the enrichment data.
              Supports 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.
              The `target_field` will be turned into a json array if `max_matches` is higher than 1, otherwise `target_field` will become a json object.
              In order to avoid documents getting too large, the maximum allowed value is 128.
            default: 1
            type: number
          override:
            description: |-
              If processor will update fields with pre-existing non-null-valued field.
              When 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.
              This option is only used for `geo_match` enrich policy types.

              Supported values include:
                - `intersects`: Return all documents whose `geo_shape` or `geo_point` field intersects the query geometry.
                - `disjoint`: Return all documents whose `geo_shape` or `geo_point` field has nothing in common with the query geometry.
                - `within`: Return all documents whose `geo_shape` or `geo_point` field is within the query geometry.
              Line geometries are not supported.
                - `contains`: Return all documents whose `geo_shape` or `geo_point` field contains the query geometry.

            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.
              Supports template snippets.
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
        required:
        - field
        - policy_name
        - target_field
    _types.GeoShapeRelation:
      type: string
      enum:
      - intersects
      - disjoint
      - within
      - contains
    ingest._types.FailProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        properties:
          message:
            description: |-
              The error message thrown by the processor.
              Supports template snippets.
            type: string
        required:
        - message
    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
              hashes both the field key and value. For other fields, the processor hashes
              only 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,
              SHA-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
              missing, the processor silently exits without modifying the document.
            default: false
            type: boolean
        required:
        - fields
    ingest._types.FingerprintDigest:
      type: string
      enum:
      - MD5
      - SHA-1
      - SHA-256
      - SHA-512
      - MurmurHash3
    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"
          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"
      - 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 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.
              Else, the download is triggered by when the pipeline is used as the `default_pipeline` or `final_pipeline` in an index.
            type: boolean
        required:
        - field
    ingest._types.GeoGridProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        properties:
          field:
            description: |-
              The field to interpret as a geo-tile.=
              The 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
    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"
      - 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.
              Else, the download is triggered by when the pipeline is used as the `default_pipeline` or `final_pipeline` in an index.
            type: boolean
        required:
        - field
    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
              Common 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.
              Patterns 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.
              Returns 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
    _types.GrokPattern:
      type: string
    ingest._types.GsubProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - 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
              By default, the `field` is updated in-place.
            default: field
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
        required:
        - field
        - pattern
        - replacement
    ingest._types.HtmlStripProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - 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
              By default, the `field` is updated in-place.
            default: field
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
        required:
        - field
    ingest._types.InferenceProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - 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.<processor_tag>
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
          field_map:
            description: |-
              Maps the document field names to the known field names of the model.
              This 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.
              This 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
              then those missing fields are quietly ignored, otherwise a missing field causes a failure.
              Only applies when using input_output configurations to explicitly list the input fields.
            type: boolean
        required:
        - model_id
    ingest._types.InferenceConfig:
      type: object
      properties:
        regression:
          description: Regression configuration for inference.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.InferenceConfigRegression"
        classification:
          description: Classification configuration for inference.
          allOf:
          - "$ref": "#/components/schemas/ingest._types.InferenceConfigClassification"
      minProperties: 1
      maxProperties: 1
    ingest._types.InferenceConfigRegression:
      type: object
      properties:
        results_field:
          description: The field that is added to incoming documents to contain the
            inference prediction.
          default: "<dependent_variable>_prediction"
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
        num_top_feature_importance_values:
          description: Specifies the maximum number of feature importance values per
            document.
          default: 0
          type: number
    ingest._types.InferenceConfigClassification:
      type: object
      properties:
        num_top_classes:
          description: Specifies the number of top class predictions to return.
          default: 0
          type: number
        num_top_feature_importance_values:
          description: Specifies the maximum number of feature importance values per
            document.
          default: 0
          type: number
        results_field:
          description: The field that is added to incoming documents to contain the
            inference prediction.
          default: "<dependent_variable>_prediction"
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
        top_classes_results_field:
          description: Specifies the field to which the top classes are written.
          default: top_classes
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
        prediction_field_type:
          description: |-
            Specifies the type of the predicted field to write.
            Valid values are: `string`, `number`, `boolean`.
          type: string
    ingest._types.InputConfig:
      type: object
      properties:
        input_field:
          type: string
        output_field:
          type: string
      required:
      - input_field
      - output_field
    ingest._types.JoinProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        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.
              By default, the field is updated in-place.
            default: field
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
        required:
        - field
        - separator
    ingest._types.JsonProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        properties:
          add_to_root:
            description: |-
              Flag that forces the parsed JSON to be added at the top level of the document.
              `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.
              When set to `merge`, conflicting fields will be merged.
              Only applicable `if add_to_root` is set to true.

              Supported values include:
                - `replace`: Root fields that conflict with fields from the parsed JSON will be overridden.
                - `merge`: Conflicting fields will be merged.

            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.
              Instead, 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.
              Any existing content in this field will be overwritten.
            default: field
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
        required:
        - field
    ingest._types.JsonProcessorConflictStrategy:
      type: string
      enum:
      - replace
      - merge
    ingest._types.KeyValueProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - 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.
              Supports 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.
              Defaults 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.
              Defaults to the root of the document.
              Supports 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"
      - 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.
              By 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"
      - 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
              CIDR notation. Also supports the named ranges listed below. These may be
              constructed with template snippets. Must specify only one of
              internal_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
              from.
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
          ignore_missing:
            description: |-
              If true and any required fields are missing, the processor quietly exits
              without modifying the document.
            default: true
            type: boolean
    ingest._types.PipelineProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        properties:
          name:
            description: |-
              The name of the pipeline to execute.
              Supports 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
    ingest._types.RedactProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        properties:
          field:
            description: The field to be redacted
            allOf:
            - "$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
            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
            type: boolean
        required:
        - field
        - patterns
    ingest._types.RegisteredDomainProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - 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,
              the 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
              without modifying the document.
            default: true
            type: boolean
        required:
        - field
    ingest._types.RemoveProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - 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
    ingest._types.RenameProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        properties:
          field:
            description: |-
              The field to be renamed.
              Supports 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
          target_field:
            description: |-
              The new name of the field.
              Supports template snippets.
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
        required:
        - field
        - target_field
    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.
              In addition to the criteria for index names, cannot contain - and must be no longer than 100 characters.
              Example values are nginx.access and nginx.error.

              Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).
              When resolving field references, the processor replaces invalid characters with _. Uses the <dataset> part
              of the index name as a fallback if all field references resolve to a null, missing, or non-string value.

              default {{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
              index names for allowed characters. Must be no longer than 100 characters.

              Supports field references with a mustache-like syntax (denoted as {{double}} or {{{triple}}} curly braces).
              When resolving field references, the processor replaces invalid characters with _. Uses the <namespace> part
              of the index name as a fallback if all field references resolve to a null, missing, or non-string value.

              default {{data_stream.namespace}}
            oneOf:
            - type: string
            - type: array
              items:
                type: string
    ingest._types.ScriptProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        properties:
          id:
            description: |-
              ID of a stored script.
              If no `source` is specified, this parameter is required.
            allOf:
            - "$ref": "#/components/schemas/_types.Id"
          lang:
            description: |+
              Script language.

              Supported values include:
                - `painless`: Painless scripting language, purpose-built for Elasticsearch.
                - `expression`: Lucene’s expressions language, compiles a JavaScript expression to bytecode.
                - `mustache`: Mustache templated, used for templates.
                - `java`: Expert Java API

            default: painless
            allOf:
            - "$ref": "#/components/schemas/_types.ScriptLanguage"
          params:
            description: Object containing parameters for the script.
            type: object
            additionalProperties:
              type: object
          source:
            description: |-
              Inline script.
              If 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.
              Supported 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.
              Supports 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`.
              Applies only when value is a template snippet.
              Must 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.
              When set to `false`, such fields will not be touched.
            default: true
            type: boolean
          value:
            description: |-
              The value to be set for the field.
              Supports template snippets.
              May specify only one of `value` or `copy_from`.
            type: object
        required:
        - field
    ingest._types.SetSecurityUserProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        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
    ingest._types.SortProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
        properties:
          field:
            description: The field to be sorted.
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
          order:
            description: |+
              The sort order to use.
              Accepts `"asc"` or `"desc"`.

              Supported values include:
                - `asc`: Ascending (smallest to largest)
                - `desc`: Descending (largest to smallest)

            default: asc
            allOf:
            - "$ref": "#/components/schemas/_types.SortOrder"
          target_field:
            description: |-
              The field to assign the sorted value to.
              By default, the field is updated in-place.
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
        required:
        - field
    ingest._types.SplitProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - 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.
              By default, the field is updated in-place.
            default: field
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
        required:
        - field
        - separator
    ingest._types.TerminateProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - type: object
    ingest._types.TrimProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - 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.
              By default, the field is updated in-place.
            default: field
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
        required:
        - field
    ingest._types.UppercaseProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - 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.
              By default, the field is updated in-place.
            default: field
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
        required:
        - field
    ingest._types.UrlDecodeProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - 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.
              By default, the field is updated in-place.
            default: field
            allOf:
            - "$ref": "#/components/schemas/_types.Field"
        required:
        - field
    ingest._types.UriPartsProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - 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 `<target_field>.original`.
            default: true
            type: boolean
          remove_if_successful:
            description: |-
              If `true`, the processor removes the `field` after parsing the URI string.
              If 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
    ingest._types.UserAgentProcessor:
      allOf:
      - "$ref": "#/components/schemas/ingest._types.ProcessorBase"
      - 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: Generally available
            type: boolean
        required:
        - field
    ingest._types.UserAgentProperty:
      type: string
      enum:
      - name
      - os
      - device
      - original
      - version
    ingest._types.FieldAccessPattern:
      type: string
      enum:
      - classic
      - flexible
    ingest._types.Document:
      type: object
      properties:
        _id:
          description: |-
            Unique identifier for the document.
            This ID must be unique within the `_index`.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        _index:
          description: Name of the index containing the document.
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        _source:
          description: JSON body for the document.
          type: object
      required:
      - _source
    ingest._types.SimulateDocumentResult:
      type: object
      properties:
        doc:
          allOf:
          - "$ref": "#/components/schemas/ingest._types.DocumentSimulation"
        error:
          allOf:
          - "$ref": "#/components/schemas/_types.ErrorCause"
        processor_results:
          type: array
          items:
            "$ref": "#/components/schemas/ingest._types.PipelineProcessorResult"
    ingest._types.DocumentSimulation:
      description: The simulated document, with optional metadata.
      type: object
      properties:
        _id:
          description: Unique identifier for the document. This ID must be unique
            within the `_index`.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        _index:
          description: Name of the index containing the document.
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        _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
        _version:
          description: ''
          allOf:
          - "$ref": "#/components/schemas/_spec_utils.StringifiedVersionNumber"
        _version_type:
          description: |2+


            Supported values include:
              - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
              - `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.
              - `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.
            NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
            If used incorrectly, it can result in loss of data.

          allOf:
          - "$ref": "#/components/schemas/_types.VersionType"
      required:
      - _id
      - _index
      - _ingest
      - _source
    ingest._types.Ingest:
      type: object
      properties:
        _redact:
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/ingest._types.Redact"
        timestamp:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        pipeline:
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
      required:
      - timestamp
    ingest._types.Redact:
      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
        is used to capture this behavior while keeping the semantics of the field type.

        Depending on the target language, code generators can keep the union or remove it and leniently parse
        strings to the target type.
      oneOf:
      - "$ref": "#/components/schemas/_types.VersionNumber"
      - type: string
    ingest._types.PipelineProcessorResult:
      type: object
      properties:
        doc:
          allOf:
          - "$ref": "#/components/schemas/ingest._types.DocumentSimulation"
        tag:
          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"
    ingest._types.PipelineSimulationStatusOptions:
      type: string
      enum:
      - success
      - error
      - error_ignored
      - skipped
      - dropped
    license.get.LicenseInformation:
      type: object
      properties:
        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
        issuer:
          type: string
        max_nodes:
          oneOf:
          - type: number
          - nullable: true
            type: string
        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:
      - 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
    logstash._types.Pipeline:
      type: object
      properties:
        description:
          description: |-
            A description of the pipeline.
            This description is not used by Elasticsearch or Logstash.
          type: string
        last_modified:
          description: |-
            The date the pipeline was last updated.
            It 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
        pipeline_metadata:
          description: |-
            Optional metadata about the pipeline, which can have any contents.
            This 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.
            It 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:
      - description
      - last_modified
      - pipeline
      - pipeline_metadata
      - pipeline_settings
      - username
    logstash._types.PipelineMetadata:
      type: object
      properties:
        type:
          type: string
        version:
          type: string
      required:
      - type
      - version
    logstash._types.PipelineSettings:
      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.
          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:
      - pipeline.workers
      - pipeline.batch.size
      - pipeline.batch.delay
      - queue.type
      - queue.max_bytes
      - queue.checkpoint.writes
    _global.mget.Operation:
      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"
        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"
        _source:
          description: If `false`, excludes all _source fields.
          allOf:
          - "$ref": "#/components/schemas/_global.search._types.SourceConfig"
        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:
          description: |2+


            Supported values include:
              - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
              - `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.
              - `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.
            NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
            If used incorrectly, it can result in loss of data.

          allOf:
          - "$ref": "#/components/schemas/_types.VersionType"
      required:
      - _id
    _global.mget.ResponseItem:
      oneOf:
      - "$ref": "#/components/schemas/_global.get.GetResult"
      - "$ref": "#/components/schemas/_global.mget.MultiGetError"
    _global.mget.MultiGetError:
      type: object
      properties:
        error:
          allOf:
          - "$ref": "#/components/schemas/_types.ErrorCause"
        _id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        _index:
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
      required:
      - error
      - _id
      - _index
    ml._types.AnalysisConfig:
      type: object
      properties:
        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
            whole 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"
        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"
        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"
        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
        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"
        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"
        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"
        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"
        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
        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. 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:
      - detectors
    ml._types.CategorizationAnalyzer:
      oneOf:
      - type: string
      - "$ref": "#/components/schemas/ml._types.CategorizationAnalyzerDefinition"
    ml._types.CategorizationAnalyzerDefinition:
      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"
        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"
        tokenizer:
          x-model: true
          oneOf:
          - type: object
          - type: string
          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`.

            '
          externalDocs:
            url: https://www.elastic.co/docs/reference/text-analysis/tokenizer-reference
            description: Tokenizer reference
    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"
        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"
        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
        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
    ml._types.DetectionRule:
      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.

            Supported values include:
              - `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.
              - `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.

          default:
          - skip_result
          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`.
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/ml._types.FilterRef"
    ml._types.RuleAction:
      type: string
      enum:
      - skip_result
      - skip_model_update
    ml._types.RuleCondition:
      type: object
      properties:
        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:
      - 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
    ml._types.FilterRef:
      type: object
      properties:
        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:
      - filter_id
    ml._types.FilterType:
      type: string
      enum:
      - include
      - exclude
    ml._types.ExcludeFrequent:
      type: string
      enum:
      - all
      - none
      - by
      - over
    ml._types.PerPartitionCategorization:
      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
        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
    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"
        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"
      minProperties: 1
      maxProperties: 1
    ml._types.DataframeEvaluationClassification:
      type: object
      properties:
        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"
        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:
      - actual_field
    ml._types.DataframeEvaluationClassificationMetrics:
      allOf:
      - "$ref": "#/components/schemas/ml._types.DataframeEvaluationMetrics"
      - 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
    ml._types.DataframeEvaluationMetrics:
      type: object
      properties:
        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:
          - "$ref": "#/components/schemas/ml._types.DataframeEvaluationClassificationMetricsAucRoc"
        precision:
          description: Precision of predictions (per-class and average).
          type: object
          additionalProperties:
            type: object
        recall:
          description: Recall of predictions (per-class and average).
          type: object
          additionalProperties:
            type: object
    ml._types.DataframeEvaluationClassificationMetricsAucRoc:
      type: object
      properties:
        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"
        include_curve:
          description: Whether or not the curve should be returned in addition to
            the score. Default value is false.
          type: boolean
    ml._types.DataframeEvaluationOutlierDetection:
      type: object
      properties:
        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"
        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"
        metrics:
          description: Specifies the metrics that are used for the evaluation.
          allOf:
          - "$ref": "#/components/schemas/ml._types.DataframeEvaluationOutlierDetectionMetrics"
      required:
      - actual_field
      - predicted_probability_field
    ml._types.DataframeEvaluationOutlierDetectionMetrics:
      allOf:
      - "$ref": "#/components/schemas/ml._types.DataframeEvaluationMetrics"
      - type: object
        properties:
          confusion_matrix:
            description: Accuracy of predictions (per-class and overall).
            type: object
            additionalProperties:
              type: object
    ml._types.DataframeEvaluationRegression:
      type: object
      properties:
        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"
        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"
        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
    ml._types.DataframeEvaluationRegressionMetrics:
      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
        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"
        huber:
          description: Pseudo Huber loss function.
          allOf:
          - "$ref": "#/components/schemas/ml._types.DataframeEvaluationRegressionMetricsHuber"
        r_squared:
          description: Proportion of the variance in the dependent variable that is
            predictable from the independent variables.
          type: object
          additionalProperties:
            type: object
    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.
          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.
          type: number
    ml.evaluate_data_frame.DataframeClassificationSummary:
      type: object
      properties:
        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:
          - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationSummaryAucRoc"
        accuracy:
          description: Accuracy of predictions (per-class and overall).
          allOf:
          - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeClassificationSummaryAccuracy"
        multiclass_confusion_matrix:
          description: Multiclass confusion matrix.
          allOf:
          - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeClassificationSummaryMulticlassConfusionMatrix"
        precision:
          description: Precision of predictions (per-class and average).
          allOf:
          - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeClassificationSummaryPrecision"
        recall:
          description: Recall of predictions (per-class and average).
          allOf:
          - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeClassificationSummaryRecall"
    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:
        tpr:
          type: number
        fpr:
          type: number
        threshold:
          type: number
      required:
      - tpr
      - fpr
      - threshold
    ml.evaluate_data_frame.DataframeEvaluationValue:
      type: object
      properties:
        value:
          type: number
      required:
      - value
    ml.evaluate_data_frame.DataframeClassificationSummaryAccuracy:
      type: object
      properties:
        classes:
          type: array
          items:
            "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationClass"
        overall_accuracy:
          type: number
      required:
      - classes
      - overall_accuracy
    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:
        confusion_matrix:
          type: array
          items:
            "$ref": "#/components/schemas/ml.evaluate_data_frame.ConfusionMatrixItem"
        other_actual_class_count:
          type: number
      required:
      - confusion_matrix
      - other_actual_class_count
    ml.evaluate_data_frame.ConfusionMatrixItem:
      type: object
      properties:
        actual_class:
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
        actual_class_doc_count:
          type: number
        predicted_classes:
          type: array
          items:
            "$ref": "#/components/schemas/ml.evaluate_data_frame.ConfusionMatrixPrediction"
        other_predicted_class_doc_count:
          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:
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
        count:
          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"
        avg_recall:
          type: number
      required:
      - classes
      - avg_recall
    ml.evaluate_data_frame.DataframeOutlierDetectionSummary:
      type: object
      properties:
        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"
        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:
      type: object
      properties:
        tp:
          description: True Positive
          type: number
        fp:
          description: False Positive
          type: number
        tn:
          description: True Negative
          type: number
        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"
        mse:
          description: Average squared difference between the predicted values and
            the actual (`ground truth`) value.
          allOf:
          - "$ref": "#/components/schemas/ml.evaluate_data_frame.DataframeEvaluationValue"
        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"
        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"
    ml._types.CalendarEvent:
      type: object
      properties:
        calendar_id:
          description: A string that uniquely identifies a calendar.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        event_id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        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/_types.DateTime"
        start_time:
          description: The timestamp for the beginning of the scheduled event in milliseconds
            since the epoch or ISO 8601 format.
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        skip_result:
          description: When true the model will not create results for this calendar
            period.
          default: true
          type: boolean
        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:
      - description
      - end_time
      - start_time
    ml._types.Page:
      type: object
      properties:
        from:
          description: Skips the specified number of items.
          default: 0
          type: number
        size:
          description: Specifies the maximum number of items to obtain.
          default: 10000
          type: number
    ml.get_calendars.Calendar:
      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: An array of anomaly detection job identifiers.
          type: array
          items:
            "$ref": "#/components/schemas/_types.Id"
      required:
      - calendar_id
      - job_ids
    ml._types.DataframeAnalyticsSummary:
      type: object
      properties:
        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"
        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"
        _meta:
          allOf:
          - "$ref": "#/components/schemas/_types.Metadata"
      required:
      - analysis
      - dest
      - id
      - source
    ml._types.DataframeAnalysisContainer:
      type: object
      properties:
        classification:
          description: The configuration information necessary to perform classification.
          allOf:
          - "$ref": "#/components/schemas/ml._types.DataframeAnalysisClassification"
        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"
        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
    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.'
            default: 2
            type: number
    ml._types.DataframeAnalysis:
      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
        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.
            For 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.
            For regression analysis, the data type of the field must be numeric.
          type: string
        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
        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
        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
        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
        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
        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"
        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
        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
        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
        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
        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
          type: number
        prediction_field_name:
          description: Defines the name of the prediction field in the results. Defaults
            to `<dependent_variable>_prediction`.
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
        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
        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
          allOf:
          - "$ref": "#/components/schemas/_types.Percentage"
      required:
      - dependent_variable
    ml._types.DataframeAnalysisFeatureProcessor:
      type: object
      properties:
        frequency_encoding:
          description: The configuration information necessary to perform frequency
            encoding.
          allOf:
          - "$ref": "#/components/schemas/ml._types.DataframeAnalysisFeatureProcessorFrequencyEncoding"
        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"
        n_gram_encoding:
          description: 'The configuration information necessary to perform n-gram
            encoding. Features created by this encoder have the following name format:
            <feature_prefix>.<ngram><string position>. 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
    ml._types.DataframeAnalysisFeatureProcessorFrequencyEncoding:
      type: object
      properties:
        feature_name:
          description: The resulting feature name.
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
        field:
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
        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:
            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
      required:
      - processors
    ml._types.DataframeAnalysisFeatureProcessorNGramEncoding:
      type: object
      properties:
        feature_prefix:
          description: The feature name prefix. Defaults to ngram_<start>_<length>.
          type: string
        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
        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
    ml._types.DataframeAnalysisFeatureProcessorOneHotEncoding:
      type: object
      properties:
        field:
          description: The name of the field to encode.
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
        hot_map:
          description: The one hot map mapping the field value with the column name.
          type: string
      required:
      - field
      - hot_map
    ml._types.DataframeAnalysisFeatureProcessorTargetMeanEncoding:
      type: object
      properties:
        default_value:
          description: The default value if field value is not found in the target_map.
          type: number
        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
    _types.Percentage:
      oneOf:
      - type: string
      - type: number
    ml._types.DataframeAnalysisOutlierDetection:
      type: object
      properties:
        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
        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
        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
        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
    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
    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
        excludes:
          description: An array of strings that defines the fields that will be included
            in the analysis.
          type: array
          items:
            type: string
    ml._types.DataframeAnalyticsAuthorization:
      type: object
      properties:
        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"
        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
    ml._types.ApiKeyAuthorization:
      type: object
      properties:
        id:
          description: The identifier for the API key.
          type: string
        name:
          description: The name of the API key.
          type: string
      required:
      - id
      - name
    ml._types.DataframeAnalyticsDestination:
      type: object
      properties:
        index:
          description: Defines the destination index to store the results of the data
            frame analytics job.
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        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
    ml._types.DataframeAnalyticsSource:
      type: object
      properties:
        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"
        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"
        query:
          x-model: true
          type: object
          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": {}}`.

            '
          externalDocs:
            url: https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl
            description: Query DSL
      required:
      - index
    ml._types.DataframeAnalytics:
      type: object
      properties:
        analysis_stats:
          description: An object containing information about the analysis job.
          allOf:
          - "$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:
          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"
        id:
          description: The unique identifier of the data frame analytics job.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        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"
        progress:
          description: The progress report of the data frame analytics job by phase.
          type: array
          items:
            "$ref": "#/components/schemas/ml._types.DataframeAnalyticsStatsProgress"
        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:
      - data_counts
      - id
      - memory_usage
      - progress
      - state
    ml._types.DataframeAnalyticsStatsContainer:
      type: object
      properties:
        classification_stats:
          description: An object containing information about the classification analysis
            job.
          allOf:
          - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsStatsHyperparameters"
        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"
      minProperties: 1
      maxProperties: 1
    ml._types.DataframeAnalyticsStatsHyperparameters:
      type: object
      properties:
        hyperparameters:
          description: An object containing the parameters of the classification analysis
            job.
          allOf:
          - "$ref": "#/components/schemas/ml._types.Hyperparameters"
        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:
          - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
        timing_stats:
          description: An object containing time statistics about the data frame analytics
            job.
          allOf:
          - "$ref": "#/components/schemas/ml._types.TimingStats"
        validation_loss:
          description: An object containing information about validation loss.
          allOf:
          - "$ref": "#/components/schemas/ml._types.ValidationLoss"
      required:
      - hyperparameters
      - iteration
      - timestamp
      - timing_stats
      - validation_loss
    ml._types.Hyperparameters:
      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
        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
        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
        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
        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
        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
        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_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.
            Once the number of attempts exceeds the threshold, the forest training stops.
          type: number
        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
        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
        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.
            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
    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:
      - elapsed_time
    ml._types.ValidationLoss:
      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.
          type: string
      required:
      - fold_values
      - loss_type
    ml._types.DataframeAnalyticsStatsOutlierDetection:
      type: object
      properties:
        parameters:
          description: The list of job parameters specified by the user or determined
            by algorithmic heuristics.
          allOf:
          - "$ref": "#/components/schemas/ml._types.OutlierDetectionParameters"
        timestamp:
          description: The timestamp when the statistics were reported in milliseconds
            since the epoch.
          allOf:
          - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
        timing_stats:
          description: An object containing time statistics about the data frame analytics
            job.
          allOf:
          - "$ref": "#/components/schemas/ml._types.TimingStats"
      required:
      - parameters
      - timestamp
      - timing_stats
    ml._types.OutlierDetectionParameters:
      type: object
      properties:
        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
        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
        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
        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
    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
    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:
          description: The timestamp when memory usage was calculated.
          allOf:
          - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
      required:
      - peak_usage_bytes
      - status
    ml._types.DataframeAnalyticsStatsProgress:
      type: object
      properties:
        phase:
          description: Defines the phase of the data frame analytics job.
          type: string
        progress_percent:
          description: The progress that the data frame analytics job has made expressed
            in percentage.
          type: number
      required:
      - phase
      - progress_percent
    ml._types.DataframeState:
      type: string
      enum:
      - started
      - stopped
      - starting
      - stopping
      - failed
    ml._types.DatafeedStats:
      type: object
      properties:
        assignment_explanation:
          description: For started datafeeds only, contains messages relating to the
            selection of a node.
          type: string
        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.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        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"
        timing_stats:
          description: An object that provides statistical information about timing
            aspect of this datafeed.
          allOf:
          - "$ref": "#/components/schemas/ml._types.DatafeedTimingStats"
        running_state:
          description: |-
            An object containing the running state for this datafeed.
            It is only provided if the datafeed is started.
          allOf:
          - "$ref": "#/components/schemas/ml._types.DatafeedRunningState"
      required:
      - datafeed_id
      - state
    ml._types.DatafeedTimingStats:
      type: object
      properties:
        bucket_count:
          description: The number of buckets processed.
          type: number
        exponential_average_search_time_per_hour_ms:
          description: The exponential average search time per hour, in milliseconds.
          allOf:
          - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis"
        exponential_average_calculation_context:
          allOf:
          - "$ref": "#/components/schemas/ml._types.ExponentialAverageCalculationContext"
        job_id:
          description: Identifier for the anomaly detection job.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        search_count:
          description: The number of searches run by the datafeed.
          type: number
        total_search_time_ms:
          description: The total time the datafeed spent searching, in milliseconds.
          allOf:
          - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis"
        average_search_time_per_bucket_ms:
          description: The average search time per bucket, in milliseconds.
          allOf:
          - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis"
      required:
      - bucket_count
      - exponential_average_search_time_per_hour_ms
      - job_id
      - search_count
      - total_search_time_ms
    _types.DurationValueUnitFloatMillis:
      allOf:
      - "$ref": "#/components/schemas/_types.UnitFloatMillis"
    _types.UnitFloatMillis:
      description: Time unit for fractional milliseconds
      type: number
    ml._types.ExponentialAverageCalculationContext:
      type: object
      properties:
        incremental_metric_value_ms:
          allOf:
          - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis"
        latest_timestamp:
          allOf:
          - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
        previous_exponential_average_ms:
          allOf:
          - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis"
      required:
      - incremental_metric_value_ms
    ml._types.DatafeedRunningState:
      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.
            For 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:
      - real_time_configured
      - real_time_running
    ml._types.RunningStateSearchInterval:
      type: object
      properties:
        end:
          description: The end time.
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        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:
      - end_ms
      - start_ms
    ml._types.Datafeed:
      type: object
      properties:
        aggregations:
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/_types.aggregations.AggregationContainer"
        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"
        chunking_config:
          allOf:
          - "$ref": "#/components/schemas/ml._types.ChunkingConfig"
        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
        indexes:
          type: array
          items:
            type: string
        job_id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        max_empty_searches:
          type: number
        query_delay:
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        script_fields:
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/_types.ScriptField"
        scroll_size:
          type: number
        delayed_data_check_config:
          allOf:
          - "$ref": "#/components/schemas/ml._types.DelayedDataCheckConfig"
        runtime_mappings:
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.RuntimeFields"
        indices_options:
          allOf:
          - "$ref": "#/components/schemas/_types.IndicesOptions"
        query:
          x-model: true
          type: object
          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": {"boost": 1}}`.

            '
          externalDocs:
            url: https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl
            description: Query DSL
      required:
      - datafeed_id
      - indices
      - job_id
      - query
      - delayed_data_check_config
    ml._types.DatafeedAuthorization:
      type: object
      properties:
        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
        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;
            this is the recommended value when the datafeed does not use aggregations.
            If the mode is `manual`, chunking is applied according to the specified `time_span`;
            use this mode when the datafeed uses aggregations. If the mode is `off`, no chunking is applied.
          allOf:
          - "$ref": "#/components/schemas/ml._types.ChunkingMode"
        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:
      - mode
    ml._types.ChunkingMode:
      type: string
      enum:
      - auto
      - manual
      - 'off'
    ml._types.DelayedDataCheckConfig:
      type: object
      properties:
        check_window:
          description: |-
            The window of time that is searched for late data. This window of time ends with the latest finalized bucket.
            It defaults to null, which causes an appropriate `check_window` to be calculated when the real-time datafeed runs.
            In 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:
      - enabled
    _types.IndicesOptions:
      description: |-
        Controls how to deal with unavailable concrete indices (closed or missing), how wildcard expressions are expanded
        to actual indices (all, closed or open indices) and how to deal with wildcard expressions that resolve to no indices.
      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
            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`.
          type: boolean
        expand_wildcards:
          description: |+
            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`.

            Supported values include:
              - `all`: Match any data stream or index, including hidden ones.
              - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
              - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
              - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
              - `none`: Wildcard expressions are not accepted.

          allOf:
          - "$ref": "#/components/schemas/_types.ExpandWildcards"
        ignore_unavailable:
          description: If true, missing or closed indices are not included in the
            response.
          default: false
          type: boolean
        ignore_throttled:
          description: If true, concrete, expanded or aliased indices are ignored
            when frozen.
          default: true
          type: boolean
    ml._types.Filter:
      type: object
      properties:
        description:
          description: A description of the filter.
          type: string
        filter_id:
          description: A string that uniquely identifies a filter.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        items:
          description: An array of strings which is the filter item list.
          type: array
          items:
            type: string
      required:
      - filter_id
      - items
    ml._types.JobStats:
      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.
          type: string
        data_counts:
          description: |-
            An object that describes the quantity of input to the job and any related error counts.
            The `data_count` values are cumulative for the lifetime of a job.
            If a model snapshot is reverted or old results are deleted, the job counts are not reset.
          allOf:
          - "$ref": "#/components/schemas/ml._types.DataCounts"
        forecasts_stats:
          description: |-
            An object that provides statistical information about forecasts belonging to this job.
            Some statistics are omitted if no forecasts have been made.
          allOf:
          - "$ref": "#/components/schemas/ml._types.JobForecastStatistics"
        job_id:
          description: Identifier for the anomaly detection job.
          type: string
        model_size_stats:
          description: An object that provides information about the size and contents
            of the model.
          allOf:
          - "$ref": "#/components/schemas/ml._types.ModelSizeStats"
        open_time:
          description: For open jobs only, the elapsed time for which the job has
            been open.
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        state:
          description: |+
            The status of the anomaly detection job, which can be one of the following values: `closed`, `closing`, `failed`, `opened`, `opening`.

            Supported values include:
              - `closing`: The job close action is in progress and has not yet completed. A closing job cannot accept further data.
              - `closed`: The job finished successfully with its model state persisted. The job must be opened before it can accept further data.
              - `opened`: The job is available to receive and process data.
              - `failed`: The job did not finish successfully due to an error.
            This 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.
            If the job had irrevocably failed, it must be force closed and then deleted.
            If the datafeed can be corrected, the job can be closed and then re-opened.
              - `opening`: The job open action is in progress and has not yet completed.

          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:
      - data_counts
      - forecasts_stats
      - job_id
      - model_size_stats
      - state
      - timing_stats
    ml._types.DataCounts:
      type: object
      properties:
        bucket_count:
          type: number
        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"
        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
    ml._types.JobForecastStatistics:
      type: object
      properties:
        memory_bytes:
          allOf:
          - "$ref": "#/components/schemas/ml._types.JobStatistics"
        processing_time_ms:
          allOf:
          - "$ref": "#/components/schemas/ml._types.JobStatistics"
        records:
          allOf:
          - "$ref": "#/components/schemas/ml._types.JobStatistics"
        status:
          type: object
          additionalProperties:
            type: number
        total:
          type: number
        forecasted_jobs:
          type: number
      required:
      - total
      - forecasted_jobs
    ml._types.JobStatistics:
      type: object
      properties:
        avg:
          type: number
        max:
          type: number
        min:
          type: number
        total:
          type: number
      required:
      - avg
      - max
      - min
      - total
    ml._types.ModelSizeStats:
      type: object
      properties:
        bucket_allocation_failures_count:
          type: number
        job_id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        log_time:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        memory_status:
          allOf:
          - "$ref": "#/components/schemas/ml._types.MemoryStatus"
        model_bytes:
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        model_bytes_exceeded:
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        model_bytes_memory_limit:
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        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
        total_over_field_count:
          type: number
        total_partition_field_count:
          type: number
        categorization_status:
          allOf:
          - "$ref": "#/components/schemas/ml._types.CategorizationStatus"
        categorized_doc_count:
          type: number
        dead_category_count:
          type: number
        failed_category_count:
          type: number
        frequent_category_count:
          type: number
        rare_category_count:
          type: number
        total_category_count:
          type: number
        timestamp:
          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
    ml._types.JobTimingStats:
      type: object
      properties:
        average_bucket_processing_time_ms:
          allOf:
          - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis"
        bucket_count:
          type: number
        exponential_average_bucket_processing_time_ms:
          allOf:
          - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis"
        exponential_average_bucket_processing_time_per_hour_ms:
          allOf:
          - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis"
        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:
      - bucket_count
      - exponential_average_bucket_processing_time_per_hour_ms
      - job_id
      - total_bucket_processing_time_ms
    ml._types.Job:
      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
        analysis_config:
          description: |-
            The analysis configuration, which 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.
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        blocked:
          allOf:
          - "$ref": "#/components/schemas/ml._types.JobBlocked"
        create_time:
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        custom_settings:
          description: |-
            Advanced configuration option.
            Contains custom metadata 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
          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.
            Note that when configuring 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: |-
            The datafeed, which retrieves data from Elasticsearch for analysis by the job.
            You can associate only one datafeed with each anomaly detection job.
          allOf:
          - "$ref": "#/components/schemas/ml._types.Datafeed"
        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
        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`.
            This property is informational; you cannot change its value.
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        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.
            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"
        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.
            It provides a more detailed view into anomaly detection.
            Model 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.
            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:
          description: |-
            A text string that affects the name of the machine learning results index.
            The default value is `shared`, which generates an index named `.ml-anomalies-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:
      - allow_lazy_open
      - analysis_config
      - data_description
      - job_id
      - model_snapshot_retention_days
      - results_index_name
    ml._types.AnalysisLimits:
      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.'
          default: 4
          type: number
        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"
    ml._types.JobBlocked:
      type: object
      properties:
        reason:
          allOf:
          - "$ref": "#/components/schemas/ml._types.JobBlockedReason"
        task_id:
          allOf:
          - "$ref": "#/components/schemas/_types.TaskId"
      required:
      - reason
    ml._types.JobBlockedReason:
      type: string
      enum:
      - delete
      - reset
      - revert
    ml._types.CustomSettings:
      description: Custom metadata about the job
      type: object
    ml._types.DataDescription:
      type: object
      properties:
        format:
          description: Only JSON format is supported at this time.
          type: string
        time_field:
          description: The name of the field that contains the timestamp.
          default: time
          allOf:
          - "$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.'
          default: epoch
          type: string
        field_delimiter:
          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.
          default: true
          x-state: Generally available
          type: boolean
        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
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
    ml._types.OverallBucket:
      type: object
      properties:
        bucket_span:
          description: The length of the bucket in seconds. Matches the job with the
            longest bucket_span value.
          allOf:
          - "$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:
          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:
      - bucket_span
      - is_interim
      - jobs
      - overall_score
      - result_type
      - timestamp
    _types.DurationValueUnitSeconds:
      allOf:
      - "$ref": "#/components/schemas/_types.UnitSeconds"
    ml._types.OverallBucketJob:
      type: object
      properties:
        job_id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        max_anomaly_score:
          type: number
      required:
      - job_id
      - max_anomaly_score
    ml._types.Include:
      type: string
      enum:
      - definition
      - feature_importance_baseline
      - hyperparameters
      - total_feature_importance
      - definition_status
    ml._types.TrainedModelConfig:
      type: object
      properties:
        model_id:
          description: Identifier for the trained model.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        model_type:
          description: |+
            The model type

            Supported values include:
              - `tree_ensemble`: The model definition is an ensemble model of decision trees.
              - `lang_ident`: A special type reserved for language identification models.
              - `pytorch`: The stored definition is a PyTorch (specifically a TorchScript) model.
            Currently only NLP models are supported.

          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:
            type: string
        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:
            type: string
        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:
      - model_id
      - tags
      - input
    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:
        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"
        text_classification:
          description: Text classification configuration for inference.
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/ml._types.TextClassificationInferenceOptions"
        zero_shot_classification:
          description: Zeroshot classification configuration for inference.
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/ml._types.ZeroShotClassificationInferenceOptions"
        fill_mask:
          description: Fill mask configuration for inference.
          x-state: Generally available
          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
          allOf:
          - "$ref": "#/components/schemas/ml._types.NerInferenceOptions"
        pass_through:
          description: Pass through configuration for inference.
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/ml._types.PassThroughInferenceOptions"
        text_embedding:
          description: Text embedding configuration for inference.
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/ml._types.TextEmbeddingInferenceOptions"
        text_expansion:
          description: Text expansion configuration for inference.
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/ml._types.TextExpansionInferenceOptions"
        question_answering:
          description: Question answering configuration for inference.
          x-state: Generally available
          allOf:
          - "$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
        tokenization:
          description: The tokenization options
          allOf:
          - "$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
        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
        vocabulary:
          allOf:
          - "$ref": "#/components/schemas/ml._types.Vocabulary"
    ml._types.TokenizationConfigContainer:
      description: Tokenization options stored in inference configuration
      type: object
      properties:
        bert:
          description: Indicates BERT tokenization and its options
          allOf:
          - "$ref": "#/components/schemas/ml._types.NlpBertTokenizationConfig"
        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
          allOf:
          - "$ref": "#/components/schemas/ml._types.NlpBertTokenizationConfig"
        roberta:
          description: Indicates RoBERTa tokenization and its options
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/ml._types.NlpRobertaTokenizationConfig"
        xlm_roberta:
          allOf:
          - "$ref": "#/components/schemas/ml._types.XlmRobertaTokenizationConfig"
      minProperties: 1
      maxProperties: 1
    ml._types.NlpBertTokenizationConfig:
      description: BERT and MPNet tokenization configuration options
      allOf:
      - "$ref": "#/components/schemas/ml._types.CommonTokenizationConfig"
      - type: object
    ml._types.CommonTokenizationConfig:
      type: object
      properties:
        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
          type: number
        span:
          description: Tokenization spanning options. Special value of -1 indicates
            no spanning takes place
          default: -1
          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
    ml._types.TokenizationTruncate:
      type: string
      enum:
      - first
      - second
      - none
    ml._types.NlpRobertaTokenizationConfig:
      description: RoBERTa tokenization configuration options
      allOf:
      - "$ref": "#/components/schemas/ml._types.CommonTokenizationConfig"
      - type: object
        properties:
          add_prefix_space:
            description: Should the tokenizer prefix input with a space character
            default: false
            type: boolean
    ml._types.XlmRobertaTokenizationConfig:
      allOf:
      - "$ref": "#/components/schemas/ml._types.CommonTokenizationConfig"
      - type: object
    ml._types.Vocabulary:
      type: object
      properties:
        index:
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
      required:
      - index
    ml._types.ZeroShotClassificationInferenceOptions:
      description: Zero shot classification configuration options
      type: object
      properties:
        tokenization:
          description: The tokenization options to update when inferring
          allOf:
          - "$ref": "#/components/schemas/ml._types.TokenizationConfigContainer"
        hypothesis_template:
          description: Hypothesis template used when tokenizing labels for prediction
          default: '"This example is {}."'
          type: string
        classification_labels:
          description: |-
            The zero shot classification labels indicating entailment, neutral, and contradiction
            Must 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.
          default: false
          type: boolean
        labels:
          description: The labels to predict.
          type: array
          items:
            type: string
      required:
      - classification_labels
    ml._types.FillMaskInferenceOptions:
      description: Fill mask inference options
      type: object
      properties:
        mask_token:
          description: |-
            The string/token which will be removed from incoming documents and replaced with the inference prediction(s).
            In a response, this field contains the mask token for the specified model/tokenizer. Each model and tokenizer
            has a predefined mask token which cannot be changed. Thus, it is recommended not to set this value in requests.
            However, if this field is present in a request, its value must match the predefined value for that model/tokenizer,
            otherwise the request will fail.
          type: string
        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.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:
          - "$ref": "#/components/schemas/ml._types.Vocabulary"
    ml._types.LearningToRankConfig:
      type: object
      properties:
        default_params:
          type: object
          additionalProperties:
            type: object
        feature_extractors:
          type: array
          items:
            type: object
            additionalProperties:
              "$ref": "#/components/schemas/ml._types.FeatureExtractor"
        num_top_feature_importance_values:
          type: number
      required:
      - num_top_feature_importance_values
    ml._types.FeatureExtractor:
      allOf:
      - "$ref": "#/components/schemas/ml._types.QueryFeatureExtractor"
    ml._types.QueryFeatureExtractor:
      type: object
      properties:
        default_score:
          type: number
        feature_name:
          type: string
        query:
          allOf:
          - "$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:
          - "$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
        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"
    ml._types.PassThroughInferenceOptions:
      description: Pass through configuration options
      type: object
      properties:
        tokenization:
          description: The tokenization options
          allOf:
          - "$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:
          - "$ref": "#/components/schemas/ml._types.Vocabulary"
    ml._types.TextEmbeddingInferenceOptions:
      description: Text embedding inference options
      type: object
      properties:
        embedding_size:
          description: The number of dimensions in the embedding output
          type: number
        tokenization:
          description: The tokenization options
          allOf:
          - "$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:
          - "$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"
        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.QuestionAnsweringInferenceOptions:
      description: Question answering inference options
      type: object
      properties:
        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.TokenizationConfigContainer"
        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
    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
    ml._types.TrainedModelConfigMetadata:
      type: object
      properties:
        model_aliases:
          type: array
          items:
            type: string
        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"
    ml._types.Hyperparameter:
      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
        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:
      - name
      - supplied
      - value
    ml._types.TotalFeatureImportance:
      type: object
      properties:
        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"
        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
    ml._types.TotalFeatureImportanceStatistics:
      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
        max:
          description: The maximum importance value across all the training data for
            this feature.
          type: number
        min:
          description: The minimum importance value across all the training data for
            this feature.
          type: number
      required:
      - mean_magnitude
      - max
      - min
    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/ml._types.TotalFeatureImportanceStatistics"
      required:
      - class_name
      - importance
    ml._types.ModelPackageConfig:
      type: object
      properties:
        create_time:
          allOf:
          - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
        description:
          type: string
        inference_config:
          type: object
          additionalProperties:
            type: object
        metadata:
          allOf:
          - "$ref": "#/components/schemas/_types.Metadata"
        minimum_version:
          type: string
        model_repository:
          type: string
        model_type:
          type: string
        packaged_model_id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        platform_architecture:
          type: string
        prefix_strings:
          allOf:
          - "$ref": "#/components/schemas/ml._types.TrainedModelPrefixStrings"
        size:
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        sha256:
          type: string
        tags:
          type: array
          items:
            type: string
        vocabulary_file:
          type: string
      required:
      - packaged_model_id
    ml._types.TrainedModelPrefixStrings:
      type: object
      properties:
        ingest:
          description: String prepended to input at ingest
          type: string
        search:
          description: String prepended to input at search
          type: string
    ml._types.TrainedModelLocation:
      type: object
      properties:
        index:
          allOf:
          - "$ref": "#/components/schemas/ml._types.TrainedModelLocationIndex"
      required:
      - index
    ml._types.TrainedModelLocationIndex:
      type: object
      properties:
        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"
        inference_stats:
          description: A collection of inference stats fields.
          allOf:
          - "$ref": "#/components/schemas/ml._types.TrainedModelInferenceStats"
        ingest:
          description: |-
            A collection of ingest stats for the model across all nodes.
            The values are summations of the individual node statistics.
            The format matches the ingest section in the nodes stats API.
          type: object
          additionalProperties:
            type: object
        model_id:
          description: The unique identifier of the trained model.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        model_size_stats:
          description: A collection of model size stats.
          allOf:
          - "$ref": "#/components/schemas/ml._types.TrainedModelSizeStats"
        pipeline_count:
          description: The number of ingest pipelines that currently refer to the
            model.
          type: number
      required:
      - model_id
      - model_size_stats
      - pipeline_count
    ml._types.TrainedModelDeploymentStats:
      type: object
      properties:
        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.
            In 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.
            Individual nodes reject an inference request if the inference queue is full.
            The queue size is controlled by the `queue_capacity` setting in the start
            trained model deployment API.
          type: number
        reason:
          description: |-
            The reason for the current deployment state. Usually only populated when
            the 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.

            Supported values include:
              - `started`: The deployment is usable; at least one node has the model allocated.
              - `starting`: The deployment has recently started but is not yet usable; the model is not allocated on any nodes.
              - `stopping`: The deployment is preparing to stop and deallocate the model from the relevant nodes.
              - `failed`: The deployment is on a failed state and must be re-deployed.

          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:
      - deployment_id
      - model_id
      - nodes
      - peak_throughput_per_minute
      - priority
      - start_time
    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.
            If set, it must be greater than or equal to 0.
            If not defined, the deployment scales to 0.
          type: number
        max_number_of_allocations:
          description: |-
            Specifies the maximum number of allocations to scale to.
            If set, it must be greater than or equal to min_number_of_allocations.
          type: number
      required:
      - enabled
    ml._types.TrainedModelDeploymentAllocationStatus:
      type: object
      properties:
        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.

            Supported values include:
              - `started`: The trained model is started on at least one node.
              - `starting`: Trained model deployment is starting but it is not yet deployed on any nodes.
              - `fully_allocated`: Trained model deployment has started on all valid nodes.

          allOf:
          - "$ref": "#/components/schemas/ml._types.DeploymentAllocationState"
        target_allocation_count:
          description: The desired number of nodes for model allocation.
          type: number
      required:
      - allocation_count
      - state
      - target_allocation_count
    ml._types.DeploymentAllocationState:
      type: string
      enum:
      - started
      - starting
      - fully_allocated
    ml._types.TrainedModelDeploymentNodesStats:
      type: object
      properties:
        average_inference_time_ms:
          description: The average time for each inference call to complete on this
            node.
          allOf:
          - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis"
        average_inference_time_ms_last_minute:
          allOf:
          - "$ref": "#/components/schemas/_types.DurationValueUnitFloatMillis"
        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"
        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:
          description: The epoch time stamp of the last inference call for the model
            on this node.
          allOf:
          - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
        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
        routing_state:
          description: The current routing state and reason for the current routing
            state for this allocation.
          allOf:
          - "$ref": "#/components/schemas/ml._types.TrainedModelAssignmentRoutingStateAndReason"
        start_time:
          description: The epoch timestamp when the allocation started.
          allOf:
          - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
        threads_per_allocation:
          description: The number of threads used by each allocation during inference.
          type: number
        throughput_last_minute:
          type: number
        timeout_count:
          description: The number of inference requests that timed out before being
            processed.
          type: number
      required:
      - 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
            `routing_state` is `failed`.
          type: string
        routing_state:
          description: |+
            The current routing state.

            Supported values include:
              - `failed`: The allocation attempt failed.
              - `started`: The trained model is allocated and ready to accept inference requests.
              - `starting`: The trained model is attempting to allocate on this node; inference requests are not yet accepted.
              - `stopped`: The trained model is fully deallocated from this node.
              - `stopping`: The trained model is being deallocated from this node.

          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
    ml._types.TrainedModelInferenceStats:
      type: object
      properties:
        cache_miss_count:
          description: |-
            The number of times the model was loaded for inference and was not retrieved from the cache.
            If this number is close to the `inference_count`, the cache is not being appropriately used.
            This can be solved by increasing the cache size or its time-to-live (TTL).
            Refer to general machine learning settings for the appropriate settings.
          type: number
        failure_count:
          description: The number of failures when using the model for inference.
          type: number
        inference_count:
          description: |-
            The total number of times the model has been called for inference.
            This is across all inference contexts, including all pipelines.
          type: number
        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:
      - cache_miss_count
      - failure_count
      - inference_count
      - missing_all_fields_count
      - timestamp
    ml._types.TrainedModelSizeStats:
      type: object
      properties:
        model_size_bytes:
          description: The size of the model in bytes.
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        required_native_memory_bytes:
          description: The amount of memory required to load the model in bytes.
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
      required:
      - model_size_bytes
      - required_native_memory_bytes
    ml._types.InferenceConfigUpdateContainer:
      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"
        text_classification:
          description: Text classification configuration for inference.
          allOf:
          - "$ref": "#/components/schemas/ml._types.TextClassificationInferenceUpdateOptions"
        zero_shot_classification:
          description: Zeroshot classification configuration for inference.
          allOf:
          - "$ref": "#/components/schemas/ml._types.ZeroShotClassificationInferenceUpdateOptions"
        fill_mask:
          description: Fill mask configuration for inference.
          allOf:
          - "$ref": "#/components/schemas/ml._types.FillMaskInferenceUpdateOptions"
        ner:
          description: Named entity recognition configuration for inference.
          allOf:
          - "$ref": "#/components/schemas/ml._types.NerInferenceUpdateOptions"
        pass_through:
          description: Pass through configuration for inference.
          allOf:
          - "$ref": "#/components/schemas/ml._types.PassThroughInferenceUpdateOptions"
        text_embedding:
          description: Text embedding configuration for inference.
          allOf:
          - "$ref": "#/components/schemas/ml._types.TextEmbeddingInferenceUpdateOptions"
        text_expansion:
          description: Text expansion configuration for inference.
          allOf:
          - "$ref": "#/components/schemas/ml._types.TextExpansionInferenceUpdateOptions"
        question_answering:
          description: Question answering configuration for inference
          allOf:
          - "$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.
          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
        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
    ml._types.NlpTokenizationUpdateOptions:
      type: object
      properties:
        truncate:
          description: Truncate options to apply
          allOf:
          - "$ref": "#/components/schemas/ml._types.TokenizationTruncate"
        span:
          description: Span options to apply
          type: number
    ml._types.ZeroShotClassificationInferenceUpdateOptions:
      type: object
      properties:
        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
        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
    ml._types.FillMaskInferenceUpdateOptions:
      type: object
      properties:
        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
    ml._types.NerInferenceUpdateOptions:
      type: object
      properties:
        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
    ml._types.PassThroughInferenceUpdateOptions:
      type: object
      properties:
        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
    ml._types.TextEmbeddingInferenceUpdateOptions:
      type: object
      properties:
        tokenization:
          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
    ml._types.TextExpansionInferenceUpdateOptions:
      type: object
      properties:
        tokenization:
          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
    ml._types.QuestionAnsweringInferenceUpdateOptions:
      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:
          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
    ml._types.InferenceResponseResult:
      type: object
      properties:
        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"
        is_truncated:
          description: |-
            Indicates whether the input text was truncated to meet the model's maximum sequence length limit. This property
            is 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
            predicted class.
            For named entity recognition (NER) tasks, it contains the annotated text output.
            For fill mask tasks, it contains the top prediction for replacing the mask token.
            For text embedding tasks, it contains the raw numerical text embedding values.
            For regression models, its a numerical value
            For 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
            value.
            Additionally
          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
            class 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"
    ml._types.TrainedModelEntities:
      type: object
      properties:
        class_name:
          type: string
        class_probability:
          type: number
        entity:
          type: string
        start_pos:
          type: number
        end_pos:
          type: number
      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"
    ml._types.TopClassEntry:
      type: object
      properties:
        class_name:
          type: string
        class_probability:
          type: number
        class_score:
          type: number
      required:
      - class_name
      - class_probability
      - class_score
    ml._types.TrainedModelInferenceFeatureImportance:
      type: object
      properties:
        feature_name:
          type: string
        importance:
          type: number
        classes:
          type: array
          items:
            "$ref": "#/components/schemas/ml._types.TrainedModelInferenceClassImportance"
      required:
      - feature_name
    ml._types.TrainedModelInferenceClassImportance:
      type: object
      properties:
        class_name:
          type: string
        importance:
          type: number
      required:
      - class_name
      - importance
    ml.preview_data_frame_analytics.DataframePreviewConfig:
      type: object
      properties:
        source:
          allOf:
          - "$ref": "#/components/schemas/ml._types.DataframeAnalyticsSource"
        analysis:
          allOf:
          - "$ref": "#/components/schemas/ml._types.DataframeAnalysisContainer"
        model_memory_limit:
          type: string
        max_num_threads:
          type: number
        analyzed_fields:
          allOf:
          - "$ref": "#/components/schemas/ml._types.DataframeAnalysisAnalyzedFields"
      required:
      - source
      - analysis
    ml._types.DatafeedConfig:
      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"
        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"
        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"
        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"
        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
        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"
        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"
        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
          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.
          default: false
          type: boolean
        analysis_config:
          description: |-
            The analysis configuration, which 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.
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        custom_settings:
          description: |-
            Advanced configuration option.
            Contains custom metadata 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.
          default: 1
          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.
            Note that when configure a datafeed, these properties are automatically set.
          allOf:
          - "$ref": "#/components/schemas/ml._types.DataDescription"
        datafeed_config:
          description: |-
            The datafeed, which retrieves data from Elasticsearch for analysis by the job.
            You can associate only one datafeed with each anomaly detection job.
          allOf:
          - "$ref": "#/components/schemas/ml._types.DatafeedConfig"
        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.
            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"
        model_plot_config:
          description: |-
            This advanced configuration option stores model information along with the results.
            It provides a more detailed view into anomaly detection.
            Model 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.
            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.
            The default value is `10`, which means snapshots ten days older than the newest snapshot are deleted.
          default: 10
          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.
            The 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.
            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
    _types.HttpHeaders:
      type: object
      additionalProperties:
        oneOf:
        - type: string
        - type: array
          items:
            type: string
    ml._types.AnalysisConfigRead:
      type: object
      properties:
        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"
        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.
          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.
            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"
        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.
          type: array
          items:
            type: string
        detectors:
          description: |-
            An array of detector configuration objects.
            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.
          type: array
          items:
            "$ref": "#/components/schemas/ml._types.DetectorRead"
        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"
        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.
            Typically, set to `30d` or longer.
            If not set, model pruning only occurs if the model memory status reaches the soft limit or the hard limit.
            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"
        latency:
          description: |-
            The size of the window in which to expect data that is out of time order.
            Defaults to no latency.
            If 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.
            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.
          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.
            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.
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
      required:
      - bucket_span
      - detectors
      - influencers
    ml._types.DetectorRead:
      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"
        custom_rules:
          description: |-
            An array of custom rule objects, which enable you to customize the way detectors operate.
            For example, a rule may dictate to the detector conditions under which results should be skipped.
            Kibana 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.
            This identifier is based on the order of the detectors in the `analysis_config`, starting at zero.
          type: number
        exclude_frequent:
          description: |-
            Contains one of the following values: `all`, `none`, `by`, or `over`.
            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, 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"
        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.
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
        function:
          description: |-
            The analysis function that is used.
            For example, `count`, `rare`, `mean`, `min`, `max`, and `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:
      - 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:
          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"
        one_hot_encoding:
          allOf:
          - "$ref": "#/components/schemas/ml.put_trained_model.OneHotEncodingPreprocessor"
        target_mean_encoding:
          allOf:
          - "$ref": "#/components/schemas/ml.put_trained_model.TargetMeanEncodingPreprocessor"
      minProperties: 1
      maxProperties: 1
    ml.put_trained_model.FrequencyEncodingPreprocessor:
      type: object
      properties:
        field:
          type: string
        feature_name:
          type: string
        frequency_map:
          type: object
          additionalProperties:
            type: number
      required:
      - field
      - feature_name
      - frequency_map
    ml.put_trained_model.OneHotEncodingPreprocessor:
      type: object
      properties:
        field:
          type: string
        hot_map:
          type: object
          additionalProperties:
            type: string
      required:
      - field
      - hot_map
    ml.put_trained_model.TargetMeanEncodingPreprocessor:
      type: object
      properties:
        field:
          type: string
        feature_name:
          type: string
        target_map:
          type: object
          additionalProperties:
            type: number
        default_value:
          type: number
      required:
      - field
      - feature_name
      - target_map
      - default_value
    ml.put_trained_model.TrainedModel:
      type: object
      properties:
        tree:
          description: The definition for a binary decision tree.
          allOf:
          - "$ref": "#/components/schemas/ml.put_trained_model.TrainedModelTree"
        tree_node:
          description: |-
            The definition of a node in a tree.
            There are two major types of nodes: leaf nodes and not-leaf nodes.
            - Leaf nodes only need node_index and leaf_value defined.
            - 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"
    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
        tree_structure:
          type: array
          items:
            "$ref": "#/components/schemas/ml.put_trained_model.TrainedModelTreeNode"
      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
        threshold:
          type: number
      required:
      - node_index
    ml.put_trained_model.Ensemble:
      type: object
      properties:
        aggregate_output:
          allOf:
          - "$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
    ml.put_trained_model.AggregateOutput:
      type: object
      properties:
        logistic_regression:
          allOf:
          - "$ref": "#/components/schemas/ml.put_trained_model.Weights"
        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"
    ml.put_trained_model.Weights:
      type: object
      properties:
        weights:
          type: number
      required:
      - weights
    ml.put_trained_model.Input:
      type: object
      properties:
        field_names:
          allOf:
          - "$ref": "#/components/schemas/_types.Names"
      required:
      - field_names
    _types.NodeIds:
      oneOf:
      - "$ref": "#/components/schemas/_types.NodeId"
      - type: array
        items:
          "$ref": "#/components/schemas/_types.NodeId"
    ml._types.TrainedModelAssignment:
      type: object
      properties:
        adaptive_allocations:
          oneOf:
          - "$ref": "#/components/schemas/ml._types.AdaptiveAllocationsSettings"
          - nullable: true
            type: string
        assignment_state:
          description: |+
            The overall assignment state.

            Supported values include:
              - `started`: The deployment is usable; at least one node has the model allocated.
              - `starting`: The deployment has recently started but is not yet usable; the model is not allocated on any nodes.
              - `stopping`: The deployment is preparing to stop and deallocate the model from the relevant nodes.
              - `failed`: The deployment is on a failed state and must be re-deployed.

          allOf:
          - "$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:
          description: The timestamp when the deployment started.
          allOf:
          - "$ref": "#/components/schemas/_types.DateTime"
        task_parameters:
          allOf:
          - "$ref": "#/components/schemas/ml._types.TrainedModelAssignmentTaskParameters"
      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
            `routing_state` is `failed`.
          type: string
        routing_state:
          description: |+
            The current routing state.

            Supported values include:
              - `failed`: The allocation attempt failed.
              - `started`: The trained model is allocated and ready to accept inference requests.
              - `starting`: The trained model is attempting to allocate on this node; inference requests are not yet accepted.
              - `stopped`: The trained model is fully deallocated from this node.
              - `stopping`: The trained model is being deallocated from this node.

          allOf:
          - "$ref": "#/components/schemas/ml._types.RoutingState"
        current_allocations:
          description: Current number of allocations.
          type: number
        target_allocations:
          description: Target number of allocations.
          type: number
      required:
      - routing_state
      - current_allocations
      - target_allocations
    ml._types.TrainedModelAssignmentTaskParameters:
      type: object
      properties:
        model_bytes:
          description: The size of the trained model in bytes.
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        model_id:
          description: The unique identifier for the trained model.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        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
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        number_of_allocations:
          description: The total number of allocations this model is assigned across
            ML nodes.
          type: number
        priority:
          allOf:
          - "$ref": "#/components/schemas/ml._types.TrainingPriority"
        per_deployment_memory_bytes:
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        per_allocation_memory_bytes:
          allOf:
          - "$ref": "#/components/schemas/_types.ByteSize"
        queue_capacity:
          description: Number of inference requests are allowed in the queue at a
            time.
          type: number
        threads_per_allocation:
          description: Number of threads per allocation.
          type: number
      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
      required:
      - model_memory_limit
    ml._types.DetectorUpdate:
      type: object
      properties:
        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.
          type: number
        description:
          description: A description of the detector.
          type: string
        custom_rules:
          description: |-
            An array of custom rule objects, which enable you to customize the way detectors operate.
            For example, a rule may dictate to the detector conditions under which results should be skipped.
            Kibana refers to custom rules as job rules.
          type: array
          items:
            "$ref": "#/components/schemas/ml._types.DetectionRule"
      required:
      - detector_index
    _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:
        allow_no_indices:
          type: boolean
        expand_wildcards:
          description: |2+


            Supported values include:
              - `all`: Match any data stream or index, including hidden ones.
              - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
              - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
              - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
              - `none`: Wildcard expressions are not accepted.

          allOf:
          - "$ref": "#/components/schemas/_types.ExpandWildcards"
        ignore_unavailable:
          type: boolean
        index:
          allOf:
          - "$ref": "#/components/schemas/_types.Indices"
        preference:
          type: string
        project_routing:
          allOf:
          - "$ref": "#/components/schemas/_types.ProjectRouting"
        request_cache:
          type: boolean
        routing:
          allOf:
          - "$ref": "#/components/schemas/_types.Routing"
        search_type:
          description: |2+


            Supported values include:
              - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.
              - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.

          allOf:
          - "$ref": "#/components/schemas/_types.SearchType"
        ccs_minimize_roundtrips:
          type: boolean
        allow_partial_search_results:
          type: boolean
        ignore_throttled:
          type: boolean
    _types.ProjectRouting:
      type: string
    _global.msearch.MultiSearchResult:
      type: object
      properties:
        took:
          type: number
        responses:
          type: array
          items:
            "$ref": "#/components/schemas/_global.msearch.ResponseItem"
      required:
      - took
      - responses
    _global.msearch.ResponseItem:
      oneOf:
      - "$ref": "#/components/schemas/_global.msearch.MultiSearchItem"
      - "$ref": "#/components/schemas/_types.ErrorResponseBase"
    _global.msearch.MultiSearchItem:
      allOf:
      - "$ref": "#/components/schemas/_global.search.ResponseBody"
      - 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.
            This 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.
            It includes:

            * Communication time between the coordinating node and data nodes
            * Time the request spends in the search thread pool, queued for execution
            * Actual run time

            It does not include:

            * Time needed to send the request to Elasticsearch
            * Time needed to serialize the JSON response
            * Time needed to send the response to a client
          type: number
        timed_out:
          description: If `true`, the request timed out before completion; returned
            results may be partial or empty.
          type: boolean
        _shards:
          description: A count of shards used for the request.
          allOf:
          - "$ref": "#/components/schemas/_types.ShardStatistics"
        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"
        _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:
          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.
            You can use this scroll ID with the scroll API to retrieve the next batch of search results for the request.
            This 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"
        terminated_early:
          type: boolean
      required:
      - took
      - timed_out
      - _shards
      - hits
    _types.ErrorResponseBase:
      description: The response returned by Elasticsearch when request execution did
        not succeed.
      type: object
      properties:
        error:
          allOf:
          - "$ref": "#/components/schemas/_types.ErrorCause"
        status:
          type: number
      required:
      - error
      - status
    _global.msearch_template.RequestItem:
      oneOf:
      - "$ref": "#/components/schemas/_global.msearch.MultisearchHeader"
      - "$ref": "#/components/schemas/_global.msearch_template.TemplateConfig"
    _global.msearch_template.TemplateConfig:
      type: object
      properties:
        explain:
          description: If `true`, returns detailed information about score calculation
            as part of each hit.
          default: false
          type: boolean
        id:
          description: |-
            The ID of the search template to use. If no `source` is specified,
            this parameter is required.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        params:
          description: |-
            Key-value pairs used to replace Mustache variables in the template.
            The key is the variable name.
            The 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
            request body. It also supports Mustache variables. If no `id` is specified, this
            parameter 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"
        _index:
          description: The index of the document.
          allOf:
          - "$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:
          description: |-
            Comma-separated list or wildcard expressions of fields to include in the statistics.
            Used 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"
        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
        filter:
          description: Filter terms based on their tf-idf scores.
          allOf:
          - "$ref": "#/components/schemas/_global.termvectors.Filter"
        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
        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:
          description: If `true`, returns the document version as part of a hit.
          allOf:
          - "$ref": "#/components/schemas/_types.VersionNumber"
        version_type:
          description: |+
            Specific version type.

            Supported values include:
              - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
              - `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.
              - `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.
            NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
            If used incorrectly, it can result in loss of data.

          allOf:
          - "$ref": "#/components/schemas/_types.VersionType"
    _global.termvectors.Filter:
      type: object
      properties:
        max_doc_freq:
          description: |-
            Ignore words which occur in more than this many docs.
            Defaults to unbounded.
          type: number
        max_num_terms:
          description: The maximum number of terms that must be returned per field.
          default: 25
          type: number
        max_term_freq:
          description: |-
            Ignore words with more than this frequency in the source doc.
            It defaults to unbounded.
          type: number
        max_word_length:
          description: |-
            The maximum word length above which words will be ignored.
            Defaults to unbounded.
          default: 0
          type: number
        min_doc_freq:
          description: Ignore terms which do not occur in at least this many docs.
          default: 1
          type: number
        min_term_freq:
          description: Ignore words with less than this frequency in the source doc.
          default: 1
          type: number
        min_word_length:
          description: The minimum word length below which words will be ignored.
          default: 0
          type: number
    _global.mtermvectors.TermVectorsResult:
      type: object
      properties:
        _id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        _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:
      - _index
    _global.termvectors.TermVector:
      type: object
      properties:
        field_statistics:
          allOf:
          - "$ref": "#/components/schemas/_global.termvectors.FieldStatistics"
        terms:
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/_global.termvectors.Term"
      required:
      - terms
    _global.termvectors.FieldStatistics:
      type: object
      properties:
        doc_count:
          type: number
        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
    _global.termvectors.Token:
      type: object
      properties:
        end_offset:
          type: number
        payload:
          type: string
        position:
          type: number
        start_offset:
          type: number
      required:
      - position
    project._types.NamedProjectRoutingExpressions:
      type: object
      additionalProperties:
        "$ref": "#/components/schemas/project._types.ProjectRoutingExpression"
    project._types.ProjectRoutingExpression:
      type: object
      properties:
        expression:
          allOf:
          - "$ref": "#/components/schemas/project._types.RoutingExpression"
      required:
      - expression
    project._types.RoutingExpression:
      type: string
    project.tags.ProjectTags:
      type: object
      properties:
        origin:
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/project.tags.Tags"
          minProperties: 1
          maxProperties: 1
        linked_projects:
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/project.tags.Tags"
      required:
      - origin
    project.tags.Tags:
      type: object
      properties:
        _id:
          type: string
        _alias:
          type: string
        _type:
          type: string
        _organisation:
          type: string
      required:
      - _id
      - _alias
      - _type
      - _organisation
    query_rules._types.QueryRule:
      type: object
      properties:
        rule_id:
          description: A unique identifier for the rule.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        type:
          description: |-
            The type of rule.
            `pinned` will identify and pin specific documents to the top of search results.
            `exclude` will exclude specific documents from search results.
          allOf:
          - "$ref": "#/components/schemas/query_rules._types.QueryRuleType"
        criteria:
          description: |-
            The criteria that must be met for the rule to be applied.
            If 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.
            The format of this action depends on the rule type.
          allOf:
          - "$ref": "#/components/schemas/query_rules._types.QueryRuleActions"
        priority:
          type: number
      required:
      - rule_id
      - type
      - criteria
      - actions
    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:

            * `always`: Matches all queries, regardless of input.
            * `contains`: Matches that contain this value anywhere in the field meet the criteria defined by the rule. Only applicable for string values.
            * `exact`: Only exact matches meet the criteria defined by the rule. Applicable for string or numerical values.
            * `fuzzy`: Exact matches or matches within the allowed Levenshtein Edit Distance meet the criteria defined by the rule. Only applicable for string values.
            * `gt`: Matches with a value greater than this value meet the criteria defined by the rule. Only applicable for numerical values.
            * `gte`: Matches with a value greater than or equal to this value meet the criteria defined by the rule. Only applicable for numerical values.
            * `lt`: Matches with a value less than this value meet the criteria defined by the rule. Only applicable for numerical values.
            * `lte`: Matches with a value less than or equal to this value meet the criteria defined by the rule. Only applicable for numerical values.
            * `prefix`: Matches that start with this value meet the criteria defined by the rule. Only applicable for string values.
            * `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"
        metadata:
          description: |-
            The metadata field to match against.
            This metadata will be used to match against `match_criteria` sent in the rule.
            It is required for all criteria types except `always`.
          type: string
        values:
          description: |-
            The values to match against the `metadata` field.
            Only one value must match for the criteria to be met.
            It is required for all criteria types except `always`.
          type: array
          items:
            type: object
      required:
      - type
    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.
            Only one of `ids` or `docs` may be specified and at least one must be specified.
          type: array
          items:
            "$ref": "#/components/schemas/_types.Id"
        docs:
          description: |-
            The documents to apply the rule to.
            Only one of `ids` or `docs` may be specified and at least one must be specified.
            There is a maximum value of 100 documents in a rule.
            You can specify the following attributes for each document:

            * `_index`: The index of the document to pin.
            * `_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"
        rules:
          description: Rules associated with the query ruleset.
          type: array
          items:
            "$ref": "#/components/schemas/query_rules._types.QueryRule"
      required:
      - ruleset_id
      - rules
    query_rules.list_rulesets.QueryRulesetListItem:
      type: object
      properties:
        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.

            NOTE: 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
        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:
      - ruleset_id
      - rule_total_count
      - rule_criteria_types_counts
      - rule_type_counts
    query_rules.test.QueryRulesetMatchedRule:
      type: object
      properties:
        ruleset_id:
          description: Ruleset unique identifier
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        rule_id:
          description: Rule unique identifier within that ruleset
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
      required:
      - ruleset_id
      - rule_id
    _global.rank_eval.RankEvalRequestItem:
      type: object
      properties:
        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"
        ratings:
          description: List of document ratings
          type: array
          items:
            "$ref": "#/components/schemas/_global.rank_eval.DocumentRating"
        template_id:
          description: The search template Id
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        params:
          description: The search template parameters.
          type: object
          additionalProperties:
            type: object
      required:
      - id
      - ratings
    _global.rank_eval.RankEvalQuery:
      type: object
      properties:
        query:
          allOf:
          - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer"
        size:
          type: number
      required:
      - query
    _global.rank_eval.DocumentRating:
      type: object
      properties:
        _id:
          description: The document ID.
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        _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:
      - _id
      - _index
      - rating
    _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/_global.rank_eval.RankEvalMetricRatingTreshold"
      - 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.
            default: false
            type: boolean
    _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".
            default: 1
            type: number
    _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
          type: number
    _global.rank_eval.RankEvalMetricRecall:
      description: Recall at K (R@k)
      allOf:
      - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRatingTreshold"
      - type: object
    _global.rank_eval.RankEvalMetricMeanReciprocalRank:
      description: Mean Reciprocal Rank
      allOf:
      - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricRatingTreshold"
      - type: object
    _global.rank_eval.RankEvalMetricDiscountedCumulativeGain:
      description: Discounted cumulative gain (DCG)
      allOf:
      - "$ref": "#/components/schemas/_global.rank_eval.RankEvalMetricBase"
      - type: object
        properties:
          normalize:
            description: If set to true, this metric will calculate the Normalized
              DCG.
            default: false
            type: boolean
    _global.rank_eval.RankEvalMetricExpectedReciprocalRank:
      description: Expected Reciprocal Rank (ERR)
      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
        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
          type: array
          items:
            "$ref": "#/components/schemas/_global.rank_eval.RankEvalHitItem"
        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:
      - metric_score
      - unrated_docs
      - hits
      - metric_details
    _global.rank_eval.UnratedDocument:
      type: object
      properties:
        _id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        _index:
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
      required:
      - _id
      - _index
    _global.rank_eval.RankEvalHitItem:
      type: object
      properties:
        hit:
          allOf:
          - "$ref": "#/components/schemas/_global.rank_eval.RankEvalHit"
        rating:
          oneOf:
          - type: number
          - nullable: true
            type: string
      required:
      - hit
    _global.rank_eval.RankEvalHit:
      type: object
      properties:
        _id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        _index:
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        _score:
          type: number
      required:
      - _id
      - _index
      - _score
    _global.reindex.Destination:
      type: object
      properties:
        index:
          description: The name of the data stream, index, or index alias you are
            copying to.
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        op_type:
          description: |+
            If it is `create`, the operation will only index documents that do not already exist (also known as "put if absent").

            IMPORTANT: To reindex to a data stream destination, this argument must be `create`.

            Supported values include:
              - `index`: Overwrite any documents that already exist.
              - `create`: Only index documents that do not already exist.

          default: index
          allOf:
          - "$ref": "#/components/schemas/_types.OpType"
        pipeline:
          description: The name of the pipeline to use.
          type: string
        routing:
          description: |-
            By default, a document's routing is preserved unless it's changed by the script.
            If it is `keep`, the routing on the bulk request sent for each match is set to the routing on the match.
            If it is `discard`, the routing on the bulk request sent for each match is set to `null`.
            If 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.

            Supported values include:
              - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
              - `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.
              - `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.
            NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
            If used incorrectly, it can result in loss of data.

          allOf:
          - "$ref": "#/components/schemas/_types.VersionType"
      required:
      - index
    _global.reindex.Source:
      type: object
      properties:
        index:
          description: |-
            The name of the data stream, index, or alias you are copying from.
            It accepts a comma-separated list to reindex from multiple sources.
          allOf:
          - "$ref": "#/components/schemas/_types.Indices"
        query:
          description: The documents to reindex, which is defined with Query DSL.
          allOf:
          - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer"
        remote:
          description: A remote instance of Elasticsearch that you want to index from.
          x-state: Technical preview
          allOf:
          - "$ref": "#/components/schemas/_global.reindex.RemoteSource"
        size:
          description: |-
            The number of documents to index per batch.
            Use 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
          type: number
        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 `<field>:<direction>` pairs to sort by before indexing.
            Use it in conjunction with `max_docs` to control what documents are reindexed.

            WARNING: Sort in reindex is deprecated.
            Sorting in reindex was never guaranteed to index documents in order and prevents further development of reindex such as resilience and performance improvements.
            If 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.
            Set 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
    _global.reindex.RemoteSource:
      type: object
      properties:
        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
        host:
          description: |-
            The URL for the remote instance of Elasticsearch that you want to index from.
            This 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).
            (It is not permitted to set this and also to set an `Authorization` header via `headers`.)
          x-state: Generally available
          type: string
        socket_timeout:
          description: The remote socket read timeout.
          default: 30s
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
      required:
      - host
    _types.Host:
      type: string
    _types.Username:
      type: string
    _types.Password:
      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
    _global.scripts_painless_execute.PainlessContextSetup:
      type: object
      properties:
        document:
          description: Document that's temporarily indexed in-memory and accessible
            from the script.
          type: object
        index:
          description: |-
            Index containing a mapping that's compatible with the indexed document.
            You may specify a remote index by prefixing the index with the remote cluster alias.
            For example, `remote1:my_index` indicates that you want to run the painless script against the "my_index" index on the "remote1" cluster.
            This request will be forwarded to the "remote1" cluster if you have configured a connection to that remote cluster.

            NOTE: Wildcards are not accepted in the index expression for this endpoint.
            The 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:
      - document
      - index
    search_application._types.SearchApplication:
      allOf:
      - "$ref": "#/components/schemas/search_application._types.SearchApplicationParameters"
      - type: object
        properties:
          name:
            description: Search Application name
            allOf:
            - "$ref": "#/components/schemas/_types.Name"
          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
    search_application._types.SearchApplicationTemplate:
      type: object
      properties:
        script:
          description: The associated mustache template.
          allOf:
          - "$ref": "#/components/schemas/_types.Script"
      required:
      - script
    search_application._types.AnalyticsCollection:
      type: object
      properties:
        event_data_stream:
          description: Data stream for the collection.
          allOf:
          - "$ref": "#/components/schemas/search_application._types.EventDataStream"
      required:
      - event_data_stream
    search_application._types.EventDataStream:
      type: object
      properties:
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
      required:
      - name
    search_application.put_behavioral_analytics.AnalyticsAcknowledgeResponseBase:
      allOf:
      - "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
      - type: object
        properties:
          name:
            description: The name of the analytics collection created or updated
            allOf:
            - "$ref": "#/components/schemas/_types.Name"
        required:
        - name
    _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
    security.authenticate.AuthenticateApiKey:
      type: object
      properties:
        id:
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
        managed_by:
          allOf:
          - "$ref": "#/components/schemas/security._types.ApiKeyManagedBy"
        internal:
          type: boolean
      required:
      - id
      - managed_by
    security._types.ApiKeyManagedBy:
      type: string
      enum:
      - cloud
      - elasticsearch
    security._types.RealmInfo:
      type: object
      properties:
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
        type:
          type: string
      required:
      - name
      - type
    security.authenticate.Token:
      type: object
      properties:
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
        type:
          x-state: Generally available
          type: string
      required:
      - name
    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"
        indices:
          description: A list of indices permissions entries.
          type: array
          items:
            "$ref": "#/components/schemas/security._types.IndicesPrivileges"
        applications:
          description: A list of application privilege entries
          type: array
          items:
            "$ref": "#/components/schemas/security._types.ApplicationPrivileges"
        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.
            NOTE: In Elastic Cloud 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
        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
    security._types.ClusterPrivilege:
      anyOf:
      - type: string
        enum:
        - all
        - cancel_task
        - manage
        - manage_api_key
        - manage_behavioral_analytics
        - manage_enrich
        - manage_esql
        - manage_index_templates
        - manage_inference
        - manage_ingest_pipelines
        - manage_logstash_pipelines
        - manage_ml
        - manage_own_api_key
        - manage_pipeline
        - manage_search_application
        - manage_search_query_rules
        - manage_search_synonyms
        - manage_security
        - manage_transform
        - monitor
        - monitor_enrich
        - monitor_esql
        - monitor_inference
        - monitor_ml
        - monitor_transform
        - none
        - post_behavioral_analytics_event
        - read_pipeline
        - read_security
      - type: string
    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
          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"
          - 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"
      required:
      - names
      - privileges
    security._types.FieldSecurity:
      type: object
      properties:
        except:
          allOf:
          - "$ref": "#/components/schemas/_types.Fields"
        grant:
          allOf:
          - "$ref": "#/components/schemas/_types.Fields"
    security._types.IndexPrivilege:
      anyOf:
      - type: string
        enum:
        - all
        - auto_configure
        - create
        - create_doc
        - create_index
        - delete
        - delete_index
        - index
        - maintenance
        - manage
        - manage_data_stream_lifecycle
        - monitor
        - none
        - read
        - view_index_metadata
        - write
      - 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.
        However, the response provided by Elasticsearch will only be string with a json-as-text content.

        Since 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"
    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
          description: |-
            When you create a role, you can specify a query that defines the document level security permissions. You can optionally
            use Mustache templates in the role query to insert the username of the current authenticated user into the role.
            Like other places in Elasticsearch that support templating or scripting, you can specify inline, stored, or file-based
            templates and define custom parameters. You access the details for the current authenticated user through the _user parameter.
          allOf:
          - "$ref": "#/components/schemas/security._types.RoleTemplateScript"
    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.
            Use 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.

            Supported values include:
              - `painless`: Painless scripting language, purpose-built for Elasticsearch.
              - `expression`: Lucene’s expressions language, compiles a JavaScript expression to bytecode.
              - `mustache`: Mustache templated, used for templates.
              - `java`: Expert Java API

          default: painless
          allOf:
          - "$ref": "#/components/schemas/_types.ScriptLanguage"
        options:
          type: object
          additionalProperties:
            type: string
      x-model: true
      externalDocs:
        description: Templating a role query
        url: https://www.elastic.co/docs/deploy-manage/users-roles/cluster-or-deployment-auth/controlling-access-at-document-field-level#templating-role-query
    security._types.RoleTemplateInlineQuery:
      oneOf:
      - type: string
      - "$ref": "#/components/schemas/_types.query_dsl.QueryContainer"
    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
        resources:
          description: A list resources to which the privileges are applied.
          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.
            NOTE: 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
      - type: string
    security._types.ApiKey:
      type: object
      properties:
        id:
          description: Id for the API key
          allOf:
          - "$ref": "#/components/schemas/_types.Id"
        name:
          description: Name of the API key.
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
        type:
          description: The type of the API key (e.g. `rest` or `cross_cluster`).
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/security._types.ApiKeyType"
        creation:
          description: Creation time for the API key in milliseconds.
          allOf:
          - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
        expiration:
          description: Expiration time for the API key in milliseconds.
          allOf:
          - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
        invalidated:
          description: |-
            Invalidation status for the API key.
            If 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
          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
          type: string
        metadata:
          description: Metadata of the API key
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/_types.Metadata"
        role_descriptors:
          description: |-
            The role descriptors assigned to this API key when it was created or last updated.
            An empty role descriptor means the API key inherits the owner user’s permissions.
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/security._types.RoleDescriptor"
        limited_by:
          description: |-
            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.
          x-state: Generally available
          type: array
          items:
            type: object
            additionalProperties:
              "$ref": "#/components/schemas/security._types.RoleDescriptor"
        access:
          description: |-
            The access granted to cross-cluster API keys.
            The access is composed of permissions for cross cluster search and cross cluster replication.
            At least one of them must be specified.
            When specified, the new access assignment fully replaces the previously assigned access.
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/security._types.Access"
        profile_uid:
          description: The profile uid for the API key owner principal, if requested
            and if it exists
          x-state: Generally available
          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
    security._types.ApiKeyType:
      type: string
      enum:
      - rest
      - cross_cluster
    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"
    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"
          - 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
    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"
          - type: array
            items:
              "$ref": "#/components/schemas/_types.IndexName"
        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"
      required:
      - names
    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"
        metadata:
          allOf:
          - "$ref": "#/components/schemas/_types.Metadata"
        description:
          type: string
        run_as:
          type: array
          items:
            type: string
        transient_metadata:
          type: object
          additionalProperties:
            type: object
        applications:
          type: array
          items:
            "$ref": "#/components/schemas/security._types.ApplicationPrivileges"
        role_templates:
          type: array
          items:
            "$ref": "#/components/schemas/security._types.RoleTemplate"
        global:
          x-state: Generally available
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              type: object
              additionalProperties:
                type: array
                items:
                  type: string
      required:
      - cluster
      - indices
      - metadata
      - applications
    security._types.RoleTemplate:
      type: object
      properties:
        format:
          allOf:
          - "$ref": "#/components/schemas/security._types.TemplateFormat"
        template:
          allOf:
          - "$ref": "#/components/schemas/_types.Script"
      required:
      - template
    security._types.TemplateFormat:
      type: string
      enum:
      - string
      - json
    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.
            It may be either application privilege names or the names of actions that are granted by those privileges
          type: array
          items:
            type: string
        resources:
          description: A list of resource names against which the privileges should
            be checked.
          type: array
          items:
            type: string
      required:
      - application
      - privileges
      - resources
    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.
            Implicitly, 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.
            If 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
    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._types.CreatedStatus:
      type: object
      properties:
        created:
          type: boolean
      required:
      - created
    security.query_api_keys.ApiKeyAggregationContainer:
      allOf:
      - type: object
        properties:
          aggregations:
            description: |-
              Sub-aggregations for this aggregation.
              Only applies to bucket aggregations.
            type: object
            additionalProperties:
              "$ref": "#/components/schemas/security.query_api_keys.ApiKeyAggregationContainer"
          meta:
            allOf:
            - "$ref": "#/components/schemas/_types.Metadata"
      - 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"
          composite:
            description: |-
              A multi-bucket aggregation that creates composite buckets from different sources.
              Unlike 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"
          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"
          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"
          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
    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.
            This 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.
            The provided text is analyzed before matching.
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/_types.query_dsl.MatchQuery"
          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"
        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:
          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.
            To 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.
            To 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
    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"
          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.
              Set to `false` to return the buckets as an array of objects.
            default: true
            type: boolean
    _types.aggregations.BucketsApiKeyQueryContainer:
      description: |-
        Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for
        the 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"
    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:
      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.
            This 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.
            The provided text is analyzed before matching.
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/_types.query_dsl.MatchQuery"
          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"
        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:
          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"
        term:
          description: |-
            Returns roles that contain an exact term in a provided field.
            To 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 roles that contain one or more exact terms in a provided field.
            To 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
    security.query_role.QueryRole:
      allOf:
      - "$ref": "#/components/schemas/security._types.RoleDescriptor"
      - type: object
        properties:
          _sort:
            allOf:
            - "$ref": "#/components/schemas/_types.SortResults"
          name:
            description: Name of the role.
            type: string
        required:
        - name
    sql._types.Column:
      type: object
      properties:
        name:
          allOf:
          - "$ref": "#/components/schemas/_types.Name"
        type:
          type: string
      required:
      - name
      - type
    sql._types.Row:
      type: array
      items:
        type: object
    sql.query.SqlFormat:
      type: string
      enum:
      - csv
      - json
      - tsv
      - txt
      - yaml
      - cbor
      - smile
    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.
            This information is the analyzers reloading result.
          allOf:
          - "$ref": "#/components/schemas/indices.reload_search_analyzers.ReloadResult"
      required:
      - result
    indices.reload_search_analyzers.ReloadResult:
      type: object
      properties:
        reload_details:
          type: array
          items:
            "$ref": "#/components/schemas/indices.reload_search_analyzers.ReloadDetails"
        _shards:
          allOf:
          - "$ref": "#/components/schemas/_types.ShardStatistics"
      required:
      - reload_details
      - _shards
    indices.reload_search_analyzers.ReloadDetails:
      type: object
      properties:
        index:
          type: string
        reloaded_analyzers:
          type: array
          items:
            type: string
        reloaded_node_ids:
          type: array
          items:
            type: string
      required:
      - index
      - reloaded_analyzers
      - reloaded_node_ids
    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"
      required:
      - id
      - synonyms
    synonyms._types.SynonymString:
      type: string
    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
      required:
      - synonyms_set
      - count
    synonyms._types.SynonymRule:
      type: object
      properties:
        id:
          description: |-
            The identifier for the synonym rule.
            If 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"
      required:
      - synonyms
    tasks._types.TaskInfo:
      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.
            For example, it might identify the search request being performed by a search task.
            Other 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.
            Many 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:
          type: number
        node:
          allOf:
          - "$ref": "#/components/schemas/_types.NodeId"
        running_time:
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
        running_time_in_nanos:
          allOf:
          - "$ref": "#/components/schemas/_types.DurationValueUnitNanos"
        start_time_in_millis:
          allOf:
          - "$ref": "#/components/schemas/_types.EpochTimeUnitMillis"
        status:
          description: |-
            The internal status of the task, which varies from task to task.
            The format also varies.
            While 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.
            Fields 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
        parent_task_id:
          allOf:
          - "$ref": "#/components/schemas/_types.TaskId"
      required:
      - action
      - cancellable
      - headers
      - id
      - node
      - running_time_in_nanos
      - start_time_in_millis
      - type
    transform.get_node_stats.TransformNodeFullStats:
      type: object
      properties:
        total:
          allOf:
          - "$ref": "#/components/schemas/transform.get_node_stats.TransformNodeStats"
      required:
      - total
    transform.get_node_stats.TransformNodeStats:
      type: object
      properties:
        scheduler:
          allOf:
          - "$ref": "#/components/schemas/transform.get_node_stats.TransformSchedulerStats"
      required:
      - scheduler
    transform.get_node_stats.TransformSchedulerStats:
      type: object
      properties:
        registered_transform_count:
          type: number
        peek_transform:
          type: string
      required:
      - registered_transform_count
    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"
      required:
      - dest
      - id
      - source
    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
    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"
      required:
      - sort
      - unique_key
    transform._types.Pivot:
      type: object
      properties:
        aggregations:
          description: |-
            Defines how to aggregate the grouped data. The following aggregations are currently supported: average, bucket
            script, bucket selector, cardinality, filter, geo bounds, geo centroid, geo line, max, median absolute deviation,
            min, missing, percentiles, rare terms, scripted metric, stats, sum, terms, top metrics, value count, weighted
            average.
          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
            currently supported: date histogram, geotile grid, histogram, terms.
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/transform._types.PivotGroupByContainer"
    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"
      minProperties: 1
      maxProperties: 1
    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"
      minProperties: 1
      maxProperties: 1
    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
            value are removed from the destination index.
          allOf:
          - "$ref": "#/components/schemas/_types.Duration"
      required:
      - field
      - max_age
    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
            checkpoint ranges with the date histogram interval when date histogram is specified as a group source in the
            transform config. As a result, less document updates in the destination index will be performed thus improving
            overall 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
            the 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
            wait 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
            exceptions occur, the page size is dynamically adjusted to a lower value. The minimum value is `10` and the
            maximum is `65,536`.
          default: 500
          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.
            In general, Point In Time is an optimization that will reduce pressure on the source index by reducing the amount
            of refreshes and merges, but it can be expensive if a large number of Point In Times are opened and closed for a
            given index. The benefits and impact depend on the data being searched, the ingest rate into the source index, and
            the 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
            of an error which means the transform never fails. Setting the number of retries other than infinite fails in
            validation.
          default: false
          x-state: Generally available
          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
            array of indices (for example, `["my-index-000001", "my-index-000002"]`), or an array of index patterns (for
            example, `["my-index-*", "my-other-index-*"]`. For remote indices use the syntax `"remote_name:index_name"`. If
            any 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"
        runtime_mappings:
          description: |-
            Definitions of search-time runtime fields that can be used by the transform. For search runtime fields all data
            nodes, including remote nodes, must be 7.12 or later.
          x-state: Generally available
          allOf:
          - "$ref": "#/components/schemas/_types.mapping.RuntimeFields"
        query:
          x-model: true
          type: object
          description: 'A query clause that retrieves a subset of data from the source
            index.

            '
          externalDocs:
            url: https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl
            description: Query DSL
      required:
      - index
    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"
      minProperties: 1
      maxProperties: 1
    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
            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.
          allOf:
          - "$ref": "#/components/schemas/_types.Field"
      required:
      - field
    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"
        reason:
          type: string
        state:
          type: string
        stats:
          allOf:
          - "$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
        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"
      required:
      - last
    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"
      required:
      - checkpoint
    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
      required:
      - docs_indexed
      - docs_processed
    transform.get_transform_stats.TransformStatsHealth:
      type: object
      properties:
        status:
          description: |2+


            Supported values include:
              - `green` (or `GREEN`): All shards are assigned.
              - `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.
              - `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.
              - `unknown`
              - `unavailable`

          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"
      required:
      - status
    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"
      required:
      - type
      - issue
      - count
    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
      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
    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
            fields when possible. If alternate mappings are required, use the create index API prior to starting the
            transform.
          allOf:
          - "$ref": "#/components/schemas/_types.IndexName"
        pipeline:
          description: The unique identifier for an ingest pipeline.
          type: string
    _global.update.UpdateWriteResponseBase:
      allOf:
      - "$ref": "#/components/schemas/_types.WriteResponseBase"
      - type: object
        properties:
          get:
            allOf:
            - "$ref": "#/components/schemas/_types.InlineGet"
  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: |-
                {
                  "id" : "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
                  "is_partial" : true,
                  "is_running" : true,
                  "start_time_in_millis" : 1583945890986,
                  "expiration_time_in_millis" : 1584377890986,
                  "response" : {
                    "took" : 1122,
                    "timed_out" : false,
                    "num_reduce_phases" : 0,
                    "_shards" : {
                      "total" : 562,
                      "successful" : 3,
                      "skipped" : 0,
                      "failed" : 0
                    },
                    "hits" : {
                      "total" : {
                        "value" : 157483,
                        "relation" : "gte"
                      },
                      "max_score" : null,
                      "hits" : [ ]
                    }
                  }
                }
    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: |-
                {
                   "took": 30,
                   "errors": false,
                   "items": [
                      {
                         "index": {
                            "_index": "test",
                            "_id": "1",
                            "_version": 1,
                            "result": "created",
                            "_shards": {
                               "total": 2,
                               "successful": 1,
                               "failed": 0
                            },
                            "status": 201,
                            "_seq_no" : 0,
                            "_primary_term": 1
                         }
                      },
                      {
                         "delete": {
                            "_index": "test",
                            "_id": "2",
                            "_version": 1,
                            "result": "not_found",
                            "_shards": {
                               "total": 2,
                               "successful": 1,
                               "failed": 0
                            },
                            "status": 404,
                            "_seq_no" : 1,
                            "_primary_term" : 2
                         }
                      },
                      {
                         "create": {
                            "_index": "test",
                            "_id": "3",
                            "_version": 1,
                            "result": "created",
                            "_shards": {
                               "total": 2,
                               "successful": 1,
                               "failed": 0
                            },
                            "status": 201,
                            "_seq_no" : 2,
                            "_primary_term" : 3
                         }
                      },
                      {
                         "update": {
                            "_index": "test",
                            "_id": "1",
                            "_version": 2,
                            "result": "updated",
                            "_shards": {
                                "total": 2,
                                "successful": 1,
                                "failed": 0
                            },
                            "status": 200,
                            "_seq_no" : 3,
                            "_primary_term" : 4
                         }
                      }
                   ]
                }
            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.

                '
              value: |-
                {
                  "took": 486,
                  "errors": true,
                  "items": [
                    {
                      "update": {
                        "_index": "index1",
                        "_id": "5",
                        "status": 404,
                        "error": {
                          "type": "document_missing_exception",
                          "reason": "[5]: document missing",
                          "index_uuid": "aAsFqTI0Tc2W0LCWgPNrOA",
                          "shard": "0",
                          "index": "index1"
                        }
                      }
                    },
                    {
                      "update": {
                        "_index": "index1",
                        "_id": "6",
                        "status": 404,
                        "error": {
                          "type": "document_missing_exception",
                          "reason": "[6]: document missing",
                          "index_uuid": "aAsFqTI0Tc2W0LCWgPNrOA",
                          "shard": "0",
                          "index": "index1"
                        }
                      }
                    },
                    {
                      "create": {
                        "_index": "index1",
                        "_id": "7",
                        "_version": 1,
                        "result": "created",
                        "_shards": {
                          "total": 2,
                          "successful": 1,
                          "failed": 0
                        },
                        "_seq_no": 0,
                        "_primary_term": 1,
                        "status": 201
                      }
                    }
                  ]
                }
            BulkResponseExample3:
              summary: Filter for failed operations
              description: 'An example response from `POST /_bulk?filter_path=items.*.error`,
                which returns only information about failed operations.

                '
              value: |-
                {
                  "items": [
                    {
                      "update": {
                        "error": {
                          "type": "document_missing_exception",
                          "reason": "[5]: document missing",
                          "index_uuid": "aAsFqTI0Tc2W0LCWgPNrOA",
                          "shard": "0",
                          "index": "index1"
                        }
                      }
                    },
                    {
                      "update": {
                        "error": {
                          "type": "document_missing_exception",
                          "reason": "[6]: document missing",
                          "index_uuid": "aAsFqTI0Tc2W0LCWgPNrOA",
                          "shard": "0",
                          "index": "index1"
                        }
                      }
                    }
                  ]
                }
    cat.aliases-200:
      description: ''
      content:
        application/json:
          schema:
            type: array
            items:
              "$ref": "#/components/schemas/cat.aliases.AliasesRecord"
          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.

                '
              value: |-
                [
                  {
                    "alias": "alias1",
                    "index": "test1",
                    "filter": "-",
                    "routing.index": "-",
                    "routing.search": "-",
                    "is_write_index": "true"
                  },
                  {
                    "alias": "alias1",
                    "index": "test1",
                    "filter": "*",
                    "routing.index": "-",
                    "routing.search": "-",
                    "is_write_index": "true"
                  },
                  {
                    "alias": "alias3",
                    "index": "test1",
                    "filter": "-",
                    "routing.index": "1",
                    "routing.search": "1",
                    "is_write_index": "true"
                  },
                  {
                    "alias": "alias4",
                    "index": "test1",
                    "filter": "-",
                    "routing.index": "2",
                    "routing.search": "1,2",
                    "is_write_index": "true"
                  }
                ]
    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`.

                '
              value: |-
                [
                  {
                    "name": "my-template-1",
                    "version": "null",
                    "alias_count": "0",
                    "mapping_count": "0",
                    "settings_count": "1",
                    "metadata_count": "0",
                    "included_in": "[my-index-template]"
                  },
                    {
                    "name": "my-template-2",
                    "version": null,
                    "alias_count": "0",
                    "mapping_count": "3",
                    "settings_count": "0",
                    "metadata_count": "0",
                    "included_in": "[my-index-template]"
                  }
                ]
    cat.count-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.

                '
              value: |-
                [
                  {
                    "epoch": "1475868259",
                    "timestamp": "15:24:20",
                    "count": "120"
                  }
                ]
            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.

                '
              value: |-
                [
                  {
                    "epoch": "1475868259",
                    "timestamp": "15:24:20",
                    "count": "121"
                  }
                ]
    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`.

                '
              value: |-
                [
                  {
                    "health": "yellow",
                    "status": "open",
                    "index": "my-index-000001",
                    "uuid": "u8FNjxh8Rfy_awN11oDKYQ",
                    "pri": "1",
                    "rep": "1",
                    "docs.count": "1200",
                    "docs.deleted": "0",
                    "store.size": "88.1kb",
                    "pri.store.size": "88.1kb",
                    "dataset.size": "88.1kb"
                  },
                  {
                    "health": "green",
                    "status": "open",
                    "index": "my-index-000002",
                    "uuid": "nYFWZEO7TUiOjLQXBaYJpA ",
                    "pri": "1",
                    "rep": "0",
                    "docs.count": "0",
                    "docs.deleted": "0",
                    "store.size": "260b",
                    "pri.store.size": "260b",
                    "dataset.size": "260b"
                  }
                ]
    cat.ml_data_frame_analytics-200:
      description: ''
      content:
        application/json:
          schema:
            type: array
            items:
              "$ref": "#/components/schemas/cat.ml_data_frame_analytics.DataFrameAnalyticsRecord"
          examples:
            CatDataframeanalyticsResponseExample1:
              description: A successful response from `GET _cat/ml/data_frame/analytics?v=true&format=json`.
              value: |-
                [
                  {
                    "id": "classifier_job_1",
                    "type": "classification",
                    "create_time": "2020-02-12T11:49:09.594Z",
                    "state": "stopped"
                  },
                    {
                    "id": "classifier_job_2",
                    "type": "classification",
                    "create_time": "2020-02-12T11:49:14.479Z",
                    "state": "stopped"
                  },
                  {
                    "id": "classifier_job_3",
                    "type": "classification",
                    "create_time": "2020-02-12T11:49:16.928Z",
                    "state": "stopped"
                  },
                  {
                    "id": "classifier_job_4",
                    "type": "classification",
                    "create_time": "2020-02-12T11:49:19.127Z",
                    "state": "stopped"
                  },
                  {
                    "id": "classifier_job_5",
                    "type": "classification",
                    "create_time": "2020-02-12T11:49:21.349Z",
                    "state": "stopped"
                  }
                ]
    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: |-
                [
                  {
                    "id": "datafeed-high_sum_total_sales",
                    "state": "stopped",
                    "buckets.count": "743",
                    "search.count": "7"
                  },
                  {
                    "id": "datafeed-low_request_rate",
                    "state": "stopped",
                    "buckets.count": "1457",
                    "search.count": "3"
                  },
                  {
                    "id": "datafeed-response_code_rates",
                    "state": "stopped",
                    "buckets.count": "1460",
                    "search.count": "18"
                  },
                  {
                    "id": "datafeed-url_scanning",
                    "state": "stopped",
                    "buckets.count": "1460",
                    "search.count": "18"
                  }
                ]
    cat.ml_jobs-200:
      description: ''
      content:
        application/json:
          schema:
            type: array
            items:
              "$ref": "#/components/schemas/cat.ml_jobs.JobsRecord"
          examples:
            CatJobsResponseExample1:
              description: A successful response from `GET _cat/ml/anomaly_detectors?h=id,s,dpr,mb&v=true&format=json`.
              value: |-
                [
                  {
                    "id": "high_sum_total_sales",
                    "s": "closed",
                    "dpr": "14022",
                    "mb": "1.5mb"
                  },
                  {
                    "id": "low_request_rate",
                    "s": "closed",
                    "dpr": "1216",
                    "mb": "40.5kb"
                  },
                  {
                    "id": "response_code_rates",
                    "s": "closed",
                    "dpr": "28146",
                    "mb": "132.7kb"
                  },
                  {
                    "id": "url_scanning",
                    "s": "closed",
                    "dpr": "28146",
                    "mb": "501.6kb"
                  }
                ]
    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: |-
                [
                  {
                    "id": "ddddd-1580216177138",
                    "heap_size": "0b",
                    "operations": "196",
                    "create_time": "2025-03-25T00:01:38.662Z",
                    "type": "pytorch",
                    "ingest.pipelines": "0",
                    "data_frame.id": "__none__"
                  },
                  {
                    "id": "lang_ident_model_1",
                    "heap_size": "1mb",
                    "operations": "39629",
                    "create_time": "2019-12-05T12:28:34.594Z",
                    "type": "lang_ident",
                    "ingest.pipelines": "0",
                    "data_frame.id": "__none__"
                  }
                ]
    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: |-
                [
                  {
                    "id" : "ecommerce_transform",
                    "state" : "started",
                    "checkpoint" : "1",
                    "documents_processed" : "705",
                    "checkpoint_progress" : "100.00",
                    "changes_last_detection_time" : null
                  }
                ]
    clear_scroll-200:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              succeeded:
                description: |-
                  If `true`, the request succeeded.
                  This 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
    cluster.get_component_template-200:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              component_templates:
                type: array
                items:
                  "$ref": "#/components/schemas/cluster._types.ComponentTemplate"
            required:
            - component_templates
          examples:
            GetComponentTemplateResponseExample1:
              description: A successful response for retrieving information about
                a component template.
              value: |-
                {
                  "component_templates" : [
                    {
                      "name" : "my-component-template",
                      "component_template" : {
                        "version" : 1,
                        "_meta" : {
                          "description" : "my custom component template"
                        },
                        "template" : {
                          "settings" : {
                            "index" : {
                              "number_of_shards" : "1"
                            }
                          },
                          "mappings" : {
                            "properties" : {
                              "@timestamp" : {
                                "type" : "date"
                              },
                              "message" : {
                                "type" : "text"
                              }
                            }
                          }
                        },
                        "created_date" : "2024-01-01T12:00:00.000Z",
                        "created_date_millis" : 1704110400000,
                        "modified_date" : "2025-01-01T12:00:00.000Z",
                        "modified_date_millis" : 1735732800000
                      }
                    }
                  ]
                }
    cluster.put_component_template-200:
      description: ''
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
    connector.put-200:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              result:
                allOf:
                - "$ref": "#/components/schemas/_types.Result"
              id:
                allOf:
                - "$ref": "#/components/schemas/_types.Id"
            required:
            - result
            - id
          examples:
            ConnectorPutResponseExample1:
              value: |-
                {
                  "result": "created",
                  "id": "my-connector"
                }
    count-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: |-
                {
                  "count": 1,
                  "_shards": {
                    "total": 1,
                    "successful": 1,
                    "skipped": 0,
                    "failed": 0
                  }
                }
    create-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: |-
                {
                   "_index": "my-index-000001",
                   "_id": "1",
                   "_version": 1,
                   "result": "created",
                   "_shards": {
                     "total": 1,
                     "successful": 1,
                     "failed": 0
                   },
                   "_seq_no": 0,
                   "_primary_term": 1
                }
    enrich.get_policy-200:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              policies:
                type: array
                items:
                  "$ref": "#/components/schemas/enrich._types.Summary"
            required:
            - policies
    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: |-
                {
                  "is_partial": false,
                  "is_running": false,
                  "took": 6,
                  "timed_out": false,
                  "hits": {
                    "total": {
                      "value": 1,
                      "relation": "eq"
                    },
                    "sequences": [
                      {
                        "join_keys": [
                          2012
                        ],
                        "events": [
                          {
                            "_index": ".ds-my-data-stream-2099.12.07-000001",
                            "_id": "AtOJ4UjUBAAx3XR5kcCM",
                            "_source": {
                              "@timestamp": "2099-12-06T11:04:07.000Z",
                              "event": {
                                "category": "file",
                                "id": "dGCHwoeS",
                                "sequence": 2
                              },
                              "file": {
                                "accessed": "2099-12-07T11:07:08.000Z",
                                "name": "cmd.exe",
                                "path": "C:\\Windows\\System32\\cmd.exe",
                                "type": "file",
                                "size": 16384
                              },
                              "process": {
                                "pid": 2012,
                                "name": "cmd.exe",
                                "executable": "C:\\Windows\\System32\\cmd.exe"
                              }
                            }
                          },
                          {
                            "_index": ".ds-my-data-stream-2099.12.07-000001",
                            "_id": "OQmfCaduce8zoHT93o4H",
                            "_source": {
                              "@timestamp": "2099-12-07T11:07:09.000Z",
                              "event": {
                                "category": "process",
                                "id": "aR3NWVOs",
                                "sequence": 4
                              },
                              "process": {
                                "pid": 2012,
                                "name": "regsvr32.exe",
                                "command_line": "regsvr32.exe  /s /u /i:https://...RegSvr32.sct scrobj.dll",
                                "executable": "C:\\Windows\\System32\\regsvr32.exe"
                              }
                            }
                          }
                        ]
                      }
                    ]
                  }
                }
    explain-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: |-
                {
                  "_index":"my-index-000001",
                  "_id":"0",
                  "matched":true,
                  "explanation":{
                      "value":1.6943598,
                      "description":"weight(message:elasticsearch in 0) [PerFieldSimilarity], result of:",
                      "details":[
                        {
                            "value":1.6943598,
                            "description":"score(freq=1.0), computed as boost * idf * tf from:",
                            "details":[
                              {
                                  "value":2.2,
                                  "description":"boost",
                                  "details":[]
                              },
                              {
                                  "value":1.3862944,
                                  "description":"idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:",
                                  "details":[
                                    {
                                        "value":1,
                                        "description":"n, number of documents containing term",
                                        "details":[]
                                    },
                                    {
                                        "value":5,
                                        "description":"N, total number of documents with field",
                                        "details":[]
                                    }
                                  ]
                              },
                              {
                                  "value":0.5555556,
                                  "description":"tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:",
                                  "details":[
                                    {
                                        "value":1.0,
                                        "description":"freq, occurrences of term within document",
                                        "details":[]
                                    },
                                    {
                                        "value":1.2,
                                        "description":"k1, term saturation parameter",
                                        "details":[]
                                    },
                                    {
                                        "value":0.75,
                                        "description":"b, length normalization parameter",
                                        "details":[]
                                    },
                                    {
                                        "value":3.0,
                                        "description":"dl, length of field",
                                        "details":[]
                                    },
                                    {
                                        "value":5.4,
                                        "description":"avgdl, average length of field",
                                        "details":[]
                                    }
                                  ]
                              }
                            ]
                        }
                      ]
                  }
                }
    field_caps-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.

                '
              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`.

                '
              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}"
    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: |-
                {
                  "_shards": {
                    "total": 2,
                    "failed": 0,
                    "successful": 2
                  },
                  "_index": "my-index-000001",
                  "_id": "W0tpsmIBdwcYyG50zbta",
                  "_version": 1,
                  "_seq_no": 0,
                  "_primary_term": 1,
                  "result": "created"
                }
            IndexResponseExample2:
              summary: Define document IDs
              description: A successful response from `PUT my-index-000001/_doc/1`.
              value: |-
                {
                  "_shards": {
                    "total": 2,
                    "failed": 0,
                    "successful": 2
                  },
                  "_index": "my-index-000001",
                  "_id": "1",
                  "_version": 1,
                  "_seq_no": 0,
                  "_primary_term": 1,
                  "result": "created"
                }
    indices.analyze-200:
      description: ''
      content:
        application/json:
          schema:
            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: |-
                {
                  "detail": {
                    "custom_analyzer": true,
                    "charfilters": [],
                    "tokenizer": {
                      "name": "standard",
                      "tokens": [
                        {
                          "token": "detailed",
                          "start_offset": 0,
                          "end_offset": 8,
                          "type": "<ALPHANUM>",
                          "position": 0
                        },
                        {
                          "token": "output",
                          "start_offset": 9,
                          "end_offset": 15,
                          "type": "<ALPHANUM>",
                          "position": 1
                        }
                      ]
                    },
                    "tokenfilters": [
                      {
                        "name": "snowball",
                        "tokens": [
                          {
                            "token": "detail",
                            "start_offset": 0,
                            "end_offset": 8,
                            "type": "<ALPHANUM>",
                            "position": 0,
                            "keyword": false
                          },
                          {
                            "token": "output",
                            "start_offset": 9,
                            "end_offset": 15,
                            "type": "<ALPHANUM>",
                            "position": 1,
                            "keyword": false
                          }
                        ]
                      }
                    ]
                  }
                }
    indices.create_from-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
    indices.delete_alias-200:
      description: ''
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/indices.delete_alias.IndicesAliasesResponseBody"
    indices.exists_alias-200:
      description: ''
      content:
        application/json: {}
    indices.get_alias-200:
      description: ''
      content:
        application/json:
          schema:
            type: object
            additionalProperties:
              "$ref": "#/components/schemas/indices.get_alias._types.IndexAliases"
    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: |-
                {
                  "data_streams": [
                    {
                      "name": "my-data-stream",
                      "timestamp_field": {
                        "name": "@timestamp"
                      },
                      "indices": [
                        {
                          "index_name": ".ds-my-data-stream-2099.03.07-000001",
                          "index_uuid": "xCEhwsp8Tey0-FLNFYVwSg",
                          "prefer_ilm": true,
                          "ilm_policy": "my-lifecycle-policy",
                          "managed_by": "Index Lifecycle Management"
                        },
                        {
                          "index_name": ".ds-my-data-stream-2099.03.08-000002",
                          "index_uuid": "PA_JquKGSiKcAKBA8DJ5gw",
                          "prefer_ilm": true,
                          "ilm_policy": "my-lifecycle-policy",
                          "managed_by": "Index Lifecycle Management"
                        }
                      ],
                      "generation": 2,
                      "_meta": {
                        "my-meta-field": "foo"
                      },
                      "status": "GREEN",
                      "next_generation_managed_by": "Index Lifecycle Management",
                      "prefer_ilm": true,
                      "template": "my-index-template",
                      "ilm_policy": "my-lifecycle-policy",
                      "hidden": false,
                      "system": false,
                      "allow_custom_routing": false,
                      "replicated": false,
                      "rollover_on_write": false
                    },
                    {
                      "name": "my-data-stream-two",
                      "timestamp_field": {
                        "name": "@timestamp"
                      },
                      "indices": [
                        {
                          "index_name": ".ds-my-data-stream-two-2099.03.08-000001",
                          "index_uuid": "3liBu2SYS5axasRt6fUIpA",
                          "prefer_ilm": true,
                          "ilm_policy": "my-lifecycle-policy",
                          "managed_by": "Index Lifecycle Management"
                        }
                      ],
                      "generation": 1,
                      "_meta": {
                        "my-meta-field": "foo"
                      },
                      "status": "YELLOW",
                      "next_generation_managed_by": "Index Lifecycle Management",
                      "prefer_ilm": true,
                      "template": "my-index-template",
                      "ilm_policy": "my-lifecycle-policy",
                      "hidden": false,
                      "system": false,
                      "allow_custom_routing": false,
                      "replicated": false,
                      "rollover_on_write": false
                    }
                  ]
                }
    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"
            required:
            - index_templates
          examples:
            GetIndexTemplateResponseExample1:
              description: A successful response for retrieving information about
                an index template.
              value: |-
                {
                  "index_templates" : [
                    {
                      "name" : "my-index-template",
                      "index_template" : {
                        "index_patterns" : [ "logs-*" ],
                        "template" : {
                          "settings" : {
                            "index" : {
                              "number_of_shards" : "1",
                              "number_of_replicas" : "1"
                            }
                          },
                          "mappings" : {
                            "properties" : {
                              "@timestamp" : {
                                "type" : "date"
                              },
                              "message" : {
                                "type" : "text"
                              }
                            }
                          }
                        },
                        "composed_of" : [ "my-component-template" ],
                        "priority" : 200,
                        "version" : 1,
                        "_meta" : {
                          "description" : "my custom index template"
                        },
                        "created_date" : "2024-01-01T12:00:00.000Z",
                        "created_date_millis" : 1704110400000,
                        "modified_date" : "2025-01-01T12:00:00.000Z",
                        "modified_date_millis" : 1735732800000
                      }
                    }
                  ]
                }
    indices.get_mapping-200:
      description: ''
      content:
        application/json:
          schema:
            type: object
            additionalProperties:
              "$ref": "#/components/schemas/indices.get_mapping.IndexMappingRecord"
    indices.get_settings-200:
      description: ''
      content:
        application/json:
          schema:
            type: object
            additionalProperties:
              "$ref": "#/components/schemas/indices._types.IndexState"
    indices.put_alias-200:
      description: ''
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
    indices.put_index_template-200:
      description: ''
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
    indices.put_mapping-200:
      description: ''
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/_types.IndicesResponseBase"
    indices.put_settings-200:
      description: ''
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
    indices.refresh-200:
      description: ''
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/_types.ShardsOperationResponseBase"
    indices.resolve_index-200:
      description: ''
      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: |-
                {
                  "indices": [
                    {
                      "name": "foo_closed",
                      "attributes": [
                        "closed"
                      ],
                      "mode": "standard"
                    },
                    {
                      "name": "freeze-index",
                      "aliases": [
                        "f-alias"
                      ],
                      "attributes": [
                        "open"
                      ]
                    },
                    {
                      "name": "remoteCluster1:bar-01",
                      "attributes": [
                        "open"
                      ]
                    }
                  ],
                  "aliases": [
                    {
                      "name": "f-alias",
                      "indices": [
                        "freeze-index",
                        "my-index-000001"
                      ]
                    }
                  ],
                  "data_streams": [
                    {
                      "name": "foo",
                      "backing_indices": [
                        ".ds-foo-2099.03.07-000001"
                      ],
                      "timestamp_field": "@timestamp"
                    }
                  ]
                }
    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`.

                '
              value: |-
                {
                  "_shards": {},
                  "indices": {
                    "test": {
                      "shards": {
                        "0": [
                          {
                            "routing": {
                              "state": "STARTED",
                              "primary": true,
                              "node": "zDC_RorJQCao9xf9pg3Fvw"
                            },
                            "num_committed_segments": 0,
                            "num_search_segments": 1,
                            "segments": {
                              "_0": {
                                "generation": 0,
                                "num_docs": 1,
                                "deleted_docs": 0,
                                "size_in_bytes": 3800,
                                "committed": false,
                                "search": true,
                                "version": "7.0.0",
                                "compound": true,
                                "attributes": {}
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                }
    indices.simulate_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:
            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.

                '
              value: |-
                {
                  "template" : {
                    "settings" : {
                      "index" : {
                        "number_of_replicas" : "1",
                        "routing" : {
                          "allocation" : {
                            "include" : {
                              "_tier_preference" : "data_content"
                            }
                          }
                        }
                      }
                    },
                    "mappings" : {
                      "properties" : {
                        "@timestamp" : {
                          "type" : "date"
                        }
                      }
                    },
                    "aliases" : { }
                  },
                  "overlapping" : [
                    {
                      "name" : "final-template",
                      "index_patterns" : [
                        "my-index-*"
                      ]
                    }
                  ]
                }
    indices.validate_query-200:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              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:
            - valid
    inference.delete-200:
      description: ''
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/inference._types.DeleteInferenceEndpointResult"
    inference.get-200:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              endpoints:
                type: array
                items:
                  "$ref": "#/components/schemas/inference._types.InferenceEndpointInfo"
            required:
            - endpoints
    inference.inference-200:
      description: ''
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/inference._types.InferenceResult"
    inference.put-200:
      description: ''
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/inference._types.InferenceEndpointInfo"
    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: |-
                {
                  "my-pipeline-id" : {
                    "description" : "describe pipeline",
                    "version" : 123,
                    "processors" : [
                      {
                        "set" : {
                          "field" : "foo",
                          "value" : "bar"
                        }
                      }
                    ],
                    "created_date" : "2024-01-01T12:00:00.000Z",
                    "created_date_millis" : 1704110400000,
                    "modified_date" : "2025-01-01T12:00:00.000Z",
                    "modified_date_millis" : 1735732800000
                  }
                }
    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: |-
                {
                   "docs": [
                      {
                         "doc": {
                            "_id": "id",
                            "_index": "index",
                            "_version": "-3",
                            "_source": {
                               "field2": "_value",
                               "foo": "bar"
                            },
                            "_ingest": {
                               "timestamp": "2017-05-04T22:30:03.187Z"
                            }
                         }
                      },
                      {
                         "doc": {
                            "_id": "id",
                            "_index": "index",
                            "_version": "-3",
                            "_source": {
                               "field2": "_value",
                               "foo": "rab"
                            },
                            "_ingest": {
                               "timestamp": "2017-05-04T22:30:03.188Z"
                            }
                         }
                      }
                   ]
                }
    logstash.get_pipeline-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`.

                '
              value: |-
                {
                  "my_pipeline": {
                    "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
                    }
                  }
                }
    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.
                  The structure of the returned documents is similar to that returned by the get API.
                  If 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
    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
    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
    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"
            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"
            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"
            required:
            - count
            - datafeeds
    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
    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"
            required:
            - count
            - jobs
    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"
            required:
            - count
            - jobs
    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"
            required:
            - count
            - overall_buckets
    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
    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
    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
    ml.preview_datafeed-200:
      description: ''
      content:
        application/json:
          schema:
            type: array
            items:
              type: object
    msearch-200:
      description: ''
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/_global.msearch.MultiSearchResult"
    msearch_template-200:
      description: ''
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/_global.msearch.MultiSearchResult"
    mtermvectors-200:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              docs:
                type: array
                items:
                  "$ref": "#/components/schemas/_global.mtermvectors.TermVectorsResult"
            required:
            - docs
    project.tags-200:
      description: ''
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/project.tags.ProjectTags"
          examples:
            ProjectTagsResponseExample1:
              summary: Project tags
              description: A successful response from `GET /_project/tags`
              value: |-
                {
                  "origin": {
                    "c56c4f8849c64cc6ae59c261f40bd195": {
                      "_id": "c56c4f8849c64cc6ae59c261f40bd195"
                      "_type": "elasticsearch",
                      "_alias": "project-1",
                      "_csp": "aws",
                      "_region": "us-east-1"
                      "mytag1": "foo",
                      "mytag2": "bar"
                    }
                  },
                  "linked_projects": {
                    "a3b88ea3f195a336ae59c261f40bd195": {
                      "_id": "a3b88ea3f195a336ae59c261f40bd195"
                      "_type": "security",
                      "_alias": "project-2",
                      "_csp": "aws",
                      "_region": "us-east-1"
                      "mytag1": "foo",
                      "mytag2": "bar"
                    },
                    "f40bd195389s3761023ca7aa8a3r0932": {
                      "_id": "f40bd195389s3761023ca7aa8a3r0932"
                      "_type": "observability",
                      "_alias": "project-3",
                      "_csp": "aws",
                      "_region": "us-east-1"
                      "mytag1": "foo",
                      "mytag2": "bar"
                    }
                  }
                }
    put_script-200:
      description: ''
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/_types.AcknowledgedResponseBase"
    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"
              failures:
                type: object
                additionalProperties:
                  type: object
            required:
            - metric_score
            - details
            - failures
    render_search_template-200:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              template_output:
                type: object
                additionalProperties:
                  type: object
            required:
            - template_output
    scripts_painless_execute-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: |-
                {
                  "result": "0.1"
                }
            ExecutePainlessScriptResponseExample2:
              summary: Filter context
              description: A successful response from `POST /_scripts/painless/_execute`
                with a `filter` context.
              value: |-
                {
                  "result": true
                }
            ExecutePainlessScriptResponseExample3:
              summary: Score context
              description: A successful response from `POST /_scripts/painless/_execute`
                with a `score` context.
              value: |-
                {
                  "result": 0.8
                }
    scroll-200:
      description: ''
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/_global.search.ResponseBody"
    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.

                '
              value: |-
                {
                  "took": 5,
                  "timed_out": false,
                  "_shards": {
                    "total": 1,
                    "successful": 1,
                    "skipped": 0,
                    "failed": 0
                  },
                  "hits": {
                    "total": {
                      "value": 20,
                      "relation": "eq"
                    },
                    "max_score": 1.3862942,
                    "hits": [
                      {
                        "_index": "my-index-000001",
                        "_id": "0",
                        "_score": 1.3862942,
                        "_source": {
                          "@timestamp": "2099-11-15T14:12:12",
                          "http": {
                            "request": {
                              "method": "get"
                            },
                            "response": {
                              "status_code": 200,
                              "bytes": 1070000
                            },
                            "version": "1.1"
                          },
                          "source": {
                            "ip": "127.0.0.1"
                          },
                          "message": "GET /search HTTP/1.1 200 1070000",
                          "user": {
                            "id": "kimchy"
                          }
                        }
                      }
                    ]
                  }
                }
    search_application.get_behavioral_analytics-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: |-
                {
                  "my_analytics_collection": {
                      "event_data_stream": {
                          "name": "behavioral_analytics-events-my_analytics_collection"
                      }
                  },
                  "my_analytics_collection2": {
                      "event_data_stream": {
                          "name": "behavioral_analytics-events-my_analytics_collection2"
                      }
                  }
                }
    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"
          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.

                '
              value: |-
                {
                  "hits": {
                    "extent": 4096,
                    "version": 2,
                    "features": [
                      {
                        "geometry": {
                          "type": "Point",
                          "coordinates": [
                            3208,
                            3864
                          ]
                        },
                        "properties": {
                          "_id": "1",
                          "_index": "museums",
                          "name": "NEMO Science Museum",
                          "price": 1750
                        },
                        "type": 1
                      },
                      {
                        "geometry": {
                          "type": "Point",
                          "coordinates": [
                            3429,
                            3496
                          ]
                        },
                        "properties": {
                          "_id": "3",
                          "_index": "museums",
                          "name": "Nederlands Scheepvaartmuseum",
                          "price": 1650
                        },
                        "type": 1
                      },
                      {
                        "geometry": {
                          "type": "Point",
                          "coordinates": [
                            3429,
                            3496
                          ]
                        },
                        "properties": {
                          "_id": "4",
                          "_index": "museums",
                          "name": "Amsterdam Centre for Architecture",
                          "price": 0
                        },
                        "type": 1
                      }
                    ]
                  },
                  "aggs": {
                    "extent": 4096,
                    "version": 2,
                    "features": [
                      {
                        "geometry": {
                          "type": "Polygon",
                          "coordinates": [
                            [
                              [
                                3072,
                                3072
                              ],
                              [
                                4096,
                                3072
                              ],
                              [
                                4096,
                                4096
                              ],
                              [
                                3072,
                                4096
                              ],
                              [
                                3072,
                                3072
                              ]
                            ]
                          ]
                        },
                        "properties": {
                          "_count": 3,
                          "max_price.value": 1750.0,
                          "min_price.value": 0.0,
                          "avg_price.value": 1133.3333333333333
                        },
                        "type": 3
                      }
                    ]
                  },
                  "meta": {
                    "extent": 4096,
                    "version": 2,
                    "features": [
                      {
                        "geometry": {
                          "type": "Polygon",
                          "coordinates": [
                            [
                              [
                                0,
                                0
                              ],
                              [
                                4096,
                                0
                              ],
                              [
                                4096,
                                4096
                              ],
                              [
                                0,
                                4096
                              ],
                              [
                                0,
                                0
                              ]
                            ]
                          ]
                        },
                        "properties": {
                          "_shards.failed": 0,
                          "_shards.skipped": 0,
                          "_shards.successful": 1,
                          "_shards.total": 1,
                          "aggregations._count.avg": 3.0,
                          "aggregations._count.count": 1,
                          "aggregations._count.max": 3.0,
                          "aggregations._count.min": 3.0,
                          "aggregations._count.sum": 3.0,
                          "aggregations.avg_price.avg": 1133.3333333333333,
                          "aggregations.avg_price.count": 1,
                          "aggregations.avg_price.max": 1133.3333333333333,
                          "aggregations.avg_price.min": 1133.3333333333333,
                          "aggregations.avg_price.sum": 1133.3333333333333,
                          "aggregations.max_price.avg": 1750.0,
                          "aggregations.max_price.count": 1,
                          "aggregations.max_price.max": 1750.0,
                          "aggregations.max_price.min": 1750.0,
                          "aggregations.max_price.sum": 1750.0,
                          "aggregations.min_price.avg": 0.0,
                          "aggregations.min_price.count": 1,
                          "aggregations.min_price.max": 0.0,
                          "aggregations.min_price.min": 0.0,
                          "aggregations.min_price.sum": 0.0,
                          "hits.max_score": 0.0,
                          "hits.total.relation": "eq",
                          "hits.total.value": 3,
                          "timed_out": false,
                          "took": 2
                        },
                        "type": 3
                      }
                    ]
                  }
                }
    search_template-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
    security.create_api_key-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
                  the UTF-8 representation of `id` and `api_key` joined
                  by a colon (`:`).
                x-state: Generally available
                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.get_role-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.

                '
              value: |-
                {
                  "my_admin_role": {
                    "description": "Grants full access to all management features within the cluster.",
                    "cluster" : [ "all" ],
                    "indices" : [
                      {
                        "names" : [ "index1", "index2" ],
                        "privileges" : [ "all" ],
                        "allow_restricted_indices" : false,
                        "field_security" : {
                          "grant" : [ "title", "body" ]}
                      }
                    ],
                    "applications" : [ ],
                    "run_as" : [ "other_user" ],
                    "metadata" : {
                      "version" : 1
                    },
                    "transient_metadata": {
                      "enabled": true
                    }
                  }
                }
    security.has_privileges-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: |-
                {
                  "username": "rdeniro",
                  "has_all_requested" : false,
                  "cluster" : {
                    "monitor" : true,
                    "manage" : false
                  },
                  "index" : {
                    "suppliers" : {
                      "read" : true
                    },
                    "products" : {
                      "read" : true
                    },
                    "inventory" : {
                      "read" : true,
                      "write" : false
                    }
                  },
                  "application" : {
                    "inventory_manager" : {
                      "product/1852563" : {
                        "read": false,
                        "data:write/inventory": false
                      }
                    }
                  }
                }
    security.put_role-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}"
    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.

                '
              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.

                '
              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.

                '
              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}"
    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.
                  The returned role format is an extension of the role definition format.
                  It adds the `transient_metadata.enabled` and the `_sort` fields.
                  `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.
                  `_sort` is present when the search query sorts on some field.
                  It 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.

                '
              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`.

                '
              value: |-
                {
                    "total": 2,
                    "count": 1,
                    "roles": [
                        {
                          "name" : "my_user_role",
                          "cluster" : [ ],
                          "indices" : [
                            {
                              "names" : [
                                "index1",
                                "index2"
                              ],
                              "privileges" : [
                                "all"
                              ],
                              "field_security" : {
                                "grant" : [
                                  "title",
                                  "body"
                                ]
                              },
                              "allow_restricted_indices" : false
                            }
                          ],
                          "applications" : [ ],
                          "run_as" : [ ],
                          "metadata" : {
                            "version" : 1
                          },
                          "transient_metadata" : {
                            "enabled" : true
                          },
                          "description" : "Grants user access to some indicies."
                        }
                    ]
                }
    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.
                  For CSV, TSV, and TXT responses, this value is returned in the `Cursor` HTTP header.
                type: string
              id:
                description: |-
                  The identifier for the search.
                  This value is returned only for async and saved synchronous searches.
                  For 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.
                  If `false`, the search has finished.
                  This value is returned only for async and saved synchronous searches.
                  For 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.
                  If `is_partial` is `true` and `is_running` is `true`, the search is still running.
                  If `is_partial` is `true` but `is_running` is `false`, the results are partial due to a failure or timeout.
                  This value is returned only for async and saved synchronous searches.
                  For 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
    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:
                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"
    terms_enum-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.
                  This 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: |-
                {
                  "_shards": {
                    "total": 1,
                    "successful": 1,
                    "failed": 0
                  },
                  "terms": [
                    "kibana"
                  ],
                  "complete" : true
                }
    termvectors-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: |-
                {
                  "_index": "my-index-000001",
                  "_id": "1",
                  "_version": 1,
                  "found": true,
                  "took": 6,
                  "term_vectors": {
                    "text": {
                      "field_statistics": {
                        "sum_doc_freq": 4,
                        "doc_count": 2,
                        "sum_ttf": 6
                      },
                      "terms": {
                        "test": {
                          "doc_freq": 2,
                          "ttf": 4,
                          "term_freq": 3,
                          "tokens": [
                            {
                              "position": 0,
                              "start_offset": 0,
                              "end_offset": 4,
                              "payload": "d29yZA=="
                            },
                            {
                              "position": 1,
                              "start_offset": 5,
                              "end_offset": 9,
                              "payload": "d29yZA=="
                            },
                            {
                              "position": 2,
                              "start_offset": 10,
                              "end_offset": 14,
                              "payload": "d29yZA=="
                            }
                          ]
                        }
                      }
                    }
                  }
                }
            TermVectorsResponseExample2:
              summary: Per-field analyzer
              description: A successful response from `GET /my-index-000001/_termvectors`
                with `per_field_analyzer` in the request body.
              value: |-
                {
                  "_index": "my-index-000001",
                  "_version": 0,
                  "found": true,
                  "took": 6,
                  "term_vectors": {
                    "fullname": {
                      "field_statistics": {
                          "sum_doc_freq": 2,
                          "doc_count": 4,
                          "sum_ttf": 4
                      },
                      "terms": {
                          "John Doe": {
                            "term_freq": 1,
                            "tokens": [
                                {
                                  "position": 0,
                                  "start_offset": 0,
                                  "end_offset": 8
                                }
                            ]
                          }
                      }
                    }
                  }
                }
            TermVectorsResponseExample3:
              summary: Terms filtering
              description: A successful response from `GET /my-index-000001/_termvectors`
                with a `filter` in the request body.
              value: |-
                {
                  "_index": "imdb",
                  "_version": 0,
                  "found": true,
                  "term_vectors": {
                      "plot": {
                        "field_statistics": {
                            "sum_doc_freq": 3384269,
                            "doc_count": 176214,
                            "sum_ttf": 3753460
                        },
                        "terms": {
                            "armored": {
                              "doc_freq": 27,
                              "ttf": 27,
                              "term_freq": 1,
                              "score": 9.74725
                            },
                            "industrialist": {
                              "doc_freq": 88,
                              "ttf": 88,
                              "term_freq": 1,
                              "score": 8.590818
                            },
                            "stark": {
                              "doc_freq": 44,
                              "ttf": 47,
                              "term_freq": 1,
                              "score": 9.272792
                            }
                        }
                      }
                  }
                }
    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: |-
                {
                  "count": 1,
                  "transforms": [
                    {
                      "id": "ecommerce_transform1",
                      "authorization": {
                        "roles": [
                          "superuser"
                        ]
                      },
                      "version": "8.4.0",
                      "create_time": 1656023416565,
                      "source": {
                        "index": [
                          "kibana_sample_data_ecommerce"
                        ],
                        "query": {
                          "term": {
                            "geoip.continent_name": {
                              "value": "Asia"
                            }
                          }
                        }
                      },
                      "dest": {
                        "index": "kibana_sample_data_ecommerce_transform1",
                        "pipeline": "add_timestamp_pipeline"
                      },
                      "frequency": "5m",
                      "sync": {
                        "time": {
                          "field": "order_date",
                          "delay": "60s"
                        }
                      },
                      "pivot": {
                        "group_by": {
                          "customer_id": {
                            "terms": {
                              "field": "customer_id"
                            }
                          }
                        },
                        "aggregations": {
                          "max_price": {
                            "max": {
                              "field": "taxful_total_price"
                            }
                          }
                        }
                      },
                      "description": "Maximum priced ecommerce data by customer_id in Asia",
                      "settings": {},
                      "retention_policy": {
                        "time": {
                          "field": "order_date",
                          "max_age": "30d"
                        }
                      }
                    }
                  ]
                }
    transform.preview_transform-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: |-
                {
                  "preview": [
                    {
                      "max_price": 171,
                      "customer_id": "10"
                    },
                    {
                      "max_price": 233,
                      "customer_id": "11"
                    },
                    {
                      "max_price": 200,
                      "customer_id": "12"
                    },
                    {
                      "max_price": 301,
                      "customer_id": "13"
                    },
                    {
                      "max_price": 176,
                      "customer_id": "14"
                    },
                    {
                      "max_price": 2250,
                      "customer_id": "15"
                    },
                    {
                      "max_price": 170,
                      "customer_id": "16"
                    },
                    {
                      "max_price": 243,
                      "customer_id": "17"
                    },
                    {
                      "max_price": 154,
                      "customer_id": "18"
                    },
                    {
                      "max_price": 393,
                      "customer_id": "19"
                    },
                    {
                      "max_price": 165,
                      "customer_id": "20"
                    },
                    {
                      "max_price": 115,
                      "customer_id": "21"
                    },
                    {
                      "max_price": 192,
                      "customer_id": "22"
                    },
                    {
                      "max_price": 169,
                      "customer_id": "23"
                    },
                    {
                      "max_price": 230,
                      "customer_id": "24"
                    },
                    {
                      "max_price": 278,
                      "customer_id": "25"
                    },
                    {
                      "max_price": 200,
                      "customer_id": "26"
                    },
                    {
                      "max_price": 344,
                      "customer_id": "27"
                    },
                    {
                      "max_price": 175,
                      "customer_id": "28"
                    },
                    {
                      "max_price": 177,
                      "customer_id": "29"
                    },
                    {
                      "max_price": 190,
                      "customer_id": "30"
                    },
                    {
                      "max_price": 190,
                      "customer_id": "31"
                    },
                    {
                      "max_price": 205,
                      "customer_id": "32"
                    },
                    {
                      "max_price": 215,
                      "customer_id": "33"
                    },
                    {
                      "max_price": 270,
                      "customer_id": "34"
                    },
                    {
                      "max_price": 184,
                      "customer_id": "36"
                    },
                    {
                      "max_price": 222,
                      "customer_id": "37"
                    },
                    {
                      "max_price": 370,
                      "customer_id": "38"
                    },
                    {
                      "max_price": 240,
                      "customer_id": "39"
                    },
                    {
                      "max_price": 230,
                      "customer_id": "4"
                    },
                    {
                      "max_price": 229,
                      "customer_id": "41"
                    },
                    {
                      "max_price": 190,
                      "customer_id": "42"
                    },
                    {
                      "max_price": 150,
                      "customer_id": "43"
                    },
                    {
                      "max_price": 175,
                      "customer_id": "44"
                    },
                    {
                      "max_price": 190,
                      "customer_id": "45"
                    },
                    {
                      "max_price": 150,
                      "customer_id": "46"
                    },
                    {
                      "max_price": 310,
                      "customer_id": "48"
                    },
                    {
                      "max_price": 223,
                      "customer_id": "49"
                    },
                    {
                      "max_price": 283,
                      "customer_id": "5"
                    },
                    {
                      "max_price": 185,
                      "customer_id": "50"
                    },
                    {
                      "max_price": 190,
                      "customer_id": "51"
                    },
                    {
                      "max_price": 333,
                      "customer_id": "52"
                    },
                    {
                      "max_price": 165,
                      "customer_id": "6"
                    },
                    {
                      "max_price": 144,
                      "customer_id": "7"
                    },
                    {
                      "max_price": 198,
                      "customer_id": "8"
                    },
                    {
                      "max_price": 210,
                      "customer_id": "9"
                    }
                  ],
                  "generated_dest_index": {
                    "mappings": {
                      "_meta": {
                        "_transform": {
                          "transform": "transform-preview",
                          "version": {
                            "created": "10.0.0"
                          },
                          "creation_date_in_millis": 1712948905889
                        },
                        "created_by": "transform"
                      },
                      "properties": {
                        "max_price": {
                          "type": "half_float"
                        },
                        "customer_id": {
                          "type": "keyword"
                        }
                      }
                    },
                    "settings": {
                      "index": {
                        "number_of_shards": "1",
                        "auto_expand_replicas": "0-1"
                      }
                    },
                    "aliases": {}
                  }
                }
  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.
        When 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.
        Ongoing 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
      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.
        A 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

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      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
      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

        Supported values include:
          - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.
          - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.

      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

        Supported values include:
          - `missing`: Only generate suggestions for terms that are not in the shard.
          - `popular`: Only suggest terms that occur in more docs on the shard than the original term.
          - `always`: Suggest any matching suggestions based on terms in the suggest text.

      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
      deprecated: false
      schema:
        type: number
      style: form
    async_search.submit-from:
      in: query
      name: from
      description: Starting offset
      deprecated: false
      schema:
        type: number
      style: form
    async_search.submit-sort:
      in: query
      name: sort
      description: A comma-separated list of <field>:<direction> pairs
      deprecated: false
      schema:
        oneOf:
        - type: string
        - type: array
          items:
            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.
        If the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.
        If 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.
        If `wait_for`, wait for a refresh to make this operation visible to search.
        If `false`, do nothing with refreshes.
        Valid 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.
        You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
        If 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.
        If this parameter is specified, only these source fields are returned.
        You can exclude fields from this subset using the `_source_excludes` query parameter.
        If the `_source` parameter is `false`, this parameter is ignored.
      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.
        The default is `1m` (one minute), which guarantees Elasticsearch waits for at least the timeout before failing.
        The 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.
        Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
        The 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: |+
        A comma-separated list of columns names to display. It supports simple wildcards.

        Supported values include:
          - `alias` (or `a`): The name of the alias.
          - `index` (or `i`, `idx`): The name of the index the alias points to.
          - `filter` (or `f`, `fi`): The filter applied to the alias.
          - `routing.index` (or `ri`, `routingIndex`): Index routing value for the alias.
          - `routing.search` (or `rs`, `routingSearch`): Search routing value for the alias.
          - `is_write_index` (or `w`, `isWriteIndex`): Indicates if the index is the write index for the alias.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/cat._types.CatAliasesColumns"
      style: form
    cat.aliases-s:
      in: query
      name: s
      description: |-
        List of columns that determine how the table should be sorted.
        Sorting defaults to ascending and can be changed by setting `:asc`
        or `: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.
        If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
        It supports comma-separated values, such as `open,hidden`.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      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.
        If the master node is not available before the timeout expires, the request fails and returns an error.
        To indicated that the request should never timeout, you can set it to `-1`.
      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.
        It accepts wildcard expressions.
        If 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: |+
        A comma-separated list of columns names to display. It supports simple wildcards.

        Supported values include:
          - `name` (or `n`): The name of the component template.
          - `version` (or `v`): The version number of the component template.
          - `alias_count` (or `a`): The number of aliases in the component template.
          - `mapping_count` (or `m`): The number of mappings in the component template.
          - `settings_count` (or `s`): The number of settings in the component template.
          - `metadata_count` (or `me`): The number of metadata entries in the component template.
          - `included_in` (or `i`): The index templates that include this component template.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/cat._types.CatComponentColumns"
      style: form
    cat.component_templates-s:
      in: query
      name: s
      description: |-
        List of columns that determine how the table should be sorted.
        Sorting defaults to ascending and can be changed by setting `:asc`
        or `: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
        local cluster state. If `false` the list of selected nodes are computed
        from the cluster state of the master node. In both cases the coordinating
        node 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.
        It 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
    cat.count-h:
      in: query
      name: h
      description: |+
        A comma-separated list of columns names to display. It supports simple wildcards.

        Supported values include:
          - `epoch` (or `t`, `time`): The Unix epoch time in seconds since 1970-01-01 00:00:00.
          - `timestamp` (or `ts`, `hms`, `hhmmss`): The current time in HH:MM:SS format.
          - `count` (or `dc`, `docs.count`, `docsCount`): The document count in the cluster or index.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/cat._types.CatCountColumns"
      style: form
    cat.count-s:
      in: query
      name: s
      description: |-
        List of columns that determine how the table should be sorted.
        Sorting defaults to ascending and can be changed by setting `:asc`
        or `: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.
        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
    cat.indices-expand_wildcards:
      in: query
      name: expand_wildcards
      description: |+
        The type of index that wildcard patterns can match.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      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.

        Supported values include:
          - `green` (or `GREEN`): All shards are assigned.
          - `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.
          - `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.
          - `unknown`
          - `unavailable`

      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-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: |+
        A comma-separated list of columns names to display. It supports simple wildcards.

        Supported values include:
          - `health` (or `h`): The current health status.
          - `status` (or `s`): The open/close status.
          - `index` (or `i`, `idx`): The index name.
          - `uuid` (or `id`, `uuid`): The index UUID.
          - `pri` (or `p`, `shards.primary`, `shardsPrimary`): The number of primary shards.
          - `rep` (or `r`, `shards.replica`, `shardsReplica`): The number of replica shards.
          - `docs.count` (or `dc`, `docsCount`): The number of available documents.
          - `docs.deleted` (or `dd`, `docsDeleted`): The number of deleted documents.
          - `creation.date` (or `cd`): The index creation date (millisecond value).
          - `creation.date.string` (or `cds`): The index creation date (as string).
          - `store.size` (or `ss`, `storeSize`): The store size of primaries and replicas.
          - `pri.store.size`: The store size of primaries.
          - `dataset.size`: The total size of the dataset.
          - `completion.size` (or `cs`, `completionSize`): The size of completion for primaries and replicas.
          - `pri.completion.size`: The size of completion for primaries.
          - `fielddata.memory_size` (or `fm`, `fielddataMemory`): The used fielddata cache for primaries and replicas.
          - `pri.fielddata.memory_size`: The used fielddata cache for primaries.
          - `fielddata.evictions` (or `fe`, `fielddataEvictions`): The number of fielddata evictions for primaries and replicas.
          - `pri.fielddata.evictions`: The number of fielddata evictions for primaries.
          - `query_cache.memory_size` (or `qcm`, `queryCacheMemory`): The used query cache for primaries and replicas.
          - `pri.query_cache.memory_size`: The used query cache for primaries.
          - `query_cache.evictions` (or `qce`, `queryCacheEvictions`): The number of query cache evictions for primaries and replicas.
          - `pri.query_cache.evictions`: The number of query cache evictions for primaries.
          - `request_cache.memory_size` (or `rcm`, `requestCacheMemory`): The used request cache for primaries and replicas.
          - `pri.request_cache.memory_size`: The used request cache for primaries.
          - `request_cache.evictions` (or `rce`, `requestCacheEvictions`): The number of request cache evictions for primaries and replicas.
          - `pri.request_cache.evictions`: The number of request cache evictions for primaries.
          - `request_cache.hit_count` (or `rchc`, `requestCacheHitCount`): The request cache hit count for primaries and replicas.
          - `pri.request_cache.hit_count`: The request cache hit count for primaries.
          - `request_cache.miss_count` (or `rcmc`, `requestCacheMissCount`): The request cache miss count for primaries and replicas.
          - `pri.request_cache.miss_count`: The request cache miss count for primaries.
          - `flush.total` (or `ft`, `flushTotal`): The number of flushes for primaries and replicas.
          - `pri.flush.total`: The number of flushes for primaries.
          - `flush.total_time` (or `ftt`, `flushTotalTime`): The time spent in flush for primaries and replicas.
          - `pri.flush.total_time`: The time spent in flush for primaries.
          - `get.current` (or `gc`, `getCurrent`): The number of current get operations for primaries and replicas.
          - `pri.get.current`: The number of current get operations for primaries.
          - `get.time` (or `gti`, `getTime`): The time spent in get for primaries and replicas.
          - `pri.get.time`: The time spent in get for primaries.
          - `get.total` (or `gto`, `getTotal`): The number of get operations for primaries and replicas.
          - `pri.get.total`: The number of get operations for primaries.
          - `get.exists_time` (or `geti`, `getExistsTime`): The time spent in successful gets for primaries and replicas.
          - `pri.get.exists_time`: The time spent in successful gets for primaries.
          - `get.exists_total` (or `geto`, `getExistsTotal`): The number of successful gets for primaries and replicas.
          - `pri.get.exists_total`: The number of successful gets for primaries.
          - `get.missing_time` (or `gmti`, `getMissingTime`): The time spent in failed gets for primaries and replicas.
          - `pri.get.missing_time`: The time spent in failed gets for primaries.
          - `get.missing_total` (or `gmto`, `getMissingTotal`): The number of failed gets for primaries and replicas.
          - `pri.get.missing_total`: The number of failed gets for primaries.
          - `indexing.delete_current` (or `idc`, `indexingDeleteCurrent`): The number of current deletions for primaries and replicas.
          - `pri.indexing.delete_current`: The number of current deletions for primaries.
          - `indexing.delete_time` (or `idti`, `indexingDeleteTime`): The time spent in deletions for primaries and replicas.
          - `pri.indexing.delete_time`: The time spent in deletions for primaries.
          - `indexing.delete_total` (or `idto`, `indexingDeleteTotal`): The number of delete operations for primaries and replicas.
          - `pri.indexing.delete_total`: The number of delete operations for primaries.
          - `indexing.index_current` (or `iic`, `indexingIndexCurrent`): The number of current indexing operations for primaries and replicas.
          - `pri.indexing.index_current`: The number of current indexing operations for primaries.
          - `indexing.index_time` (or `iiti`, `indexingIndexTime`): The time spent in indexing for primaries and replicas.
          - `pri.indexing.index_time`: The time spent in indexing for primaries.
          - `indexing.index_total` (or `iito`, `indexingIndexTotal`): The number of indexing operations for primaries and replicas.
          - `pri.indexing.index_total`: The number of indexing operations for primaries.
          - `indexing.index_failed` (or `iif`, `indexingIndexFailed`): The number of failed indexing operations for primaries and replicas.
          - `pri.indexing.index_failed`: The number of failed indexing operations for primaries.
          - `indexing.index_failed_due_to_version_conflict` (or `iifvc`, `indexingIndexFailedDueToVersionConflict`): The number of failed indexing operations due to version conflict for primaries and replicas.
          - `pri.indexing.index_failed_due_to_version_conflict`: The number of failed indexing operations due to version conflict for primaries.
          - `merges.current` (or `mc`, `mergesCurrent`): The number of current merges for primaries and replicas.
          - `pri.merges.current`: The number of current merges for primaries.
          - `merges.current_docs` (or `mcd`, `mergesCurrentDocs`): The number of current merging documents for primaries and replicas.
          - `pri.merges.current_docs`: The number of current merging documents for primaries.
          - `merges.current_size` (or `mcs`, `mergesCurrentSize`): The size of current merges for primaries and replicas.
          - `pri.merges.current_size`: The size of current merges for primaries.
          - `merges.total` (or `mt`, `mergesTotal`): The number of completed merge operations for primaries and replicas.
          - `pri.merges.total`: The number of completed merge operations for primaries.
          - `merges.total_docs` (or `mtd`, `mergesTotalDocs`): The number of merged documents for primaries and replicas.
          - `pri.merges.total_docs`: The number of merged documents for primaries.
          - `merges.total_size` (or `mts`, `mergesTotalSize`): The merged size for primaries and replicas.
          - `pri.merges.total_size`: The merged size for primaries.
          - `merges.total_time` (or `mtt`, `mergesTotalTime`): The time spent in merges for primaries and replicas.
          - `pri.merges.total_time`: The time spent in merges for primaries.
          - `refresh.total` (or `rto`, `refreshTotal`): The total refreshes for primaries and replicas.
          - `pri.refresh.total`: The total refreshes for primaries.
          - `refresh.time` (or `rti`, `refreshTime`): The time spent in refreshes for primaries and replicas.
          - `pri.refresh.time`: The time spent in refreshes for primaries.
          - `refresh.external_total` (or `rto`, `refreshTotal`): The total external refreshes for primaries and replicas.
          - `pri.refresh.external_total`: The total external refreshes for primaries.
          - `refresh.external_time` (or `rti`, `refreshTime`): The time spent in external refreshes for primaries and replicas.
          - `pri.refresh.external_time`: The time spent in external refreshes for primaries.
          - `refresh.listeners` (or `rli`, `refreshListeners`): The number of pending refresh listeners for primaries and replicas.
          - `pri.refresh.listeners`: The number of pending refresh listeners for primaries.
          - `search.fetch_current` (or `sfc`, `searchFetchCurrent`): The current fetch phase operations for primaries and replicas.
          - `pri.search.fetch_current`: The current fetch phase operations for primaries.
          - `search.fetch_time` (or `sfti`, `searchFetchTime`): The time spent in fetch phase for primaries and replicas.
          - `pri.search.fetch_time`: The time spent in fetch phase for primaries.
          - `search.fetch_total` (or `sfto`, `searchFetchTotal`): The total fetch operations for primaries and replicas.
          - `pri.search.fetch_total`: The total fetch operations for primaries.
          - `search.open_contexts` (or `so`, `searchOpenContexts`): The open search contexts for primaries and replicas.
          - `pri.search.open_contexts`: The open search contexts for primaries.
          - `search.query_current` (or `sqc`, `searchQueryCurrent`): The current query phase operations for primaries and replicas.
          - `pri.search.query_current`: The current query phase operations for primaries.
          - `search.query_time` (or `sqti`, `searchQueryTime`): The time spent in query phase for primaries and replicas.
          - `pri.search.query_time`: The time spent in query phase for primaries.
          - `search.query_total` (or `sqto`, `searchQueryTotal`): The total query phase operations for primaries and replicas.
          - `pri.search.query_total`: The total query phase operations for primaries.
          - `search.scroll_current` (or `scc`, `searchScrollCurrent`): The open scroll contexts for primaries and replicas.
          - `pri.search.scroll_current`: The open scroll contexts for primaries.
          - `search.scroll_time` (or `scti`, `searchScrollTime`): The time scroll contexts held open for primaries and replicas.
          - `pri.search.scroll_time`: The time scroll contexts held open for primaries.
          - `search.scroll_total` (or `scto`, `searchScrollTotal`): The completed scroll contexts for primaries and replicas.
          - `pri.search.scroll_total`: The completed scroll contexts for primaries.
          - `segments.count` (or `sc`, `segmentsCount`): The number of segments for primaries and replicas.
          - `pri.segments.count`: The number of segments for primaries.
          - `segments.memory` (or `sm`, `segmentsMemory`): The memory used by segments for primaries and replicas.
          - `pri.segments.memory`: The memory used by segments for primaries.
          - `segments.index_writer_memory` (or `siwm`, `segmentsIndexWriterMemory`): The memory used by index writer for primaries and replicas.
          - `pri.segments.index_writer_memory`: The memory used by index writer for primaries.
          - `segments.version_map_memory` (or `svmm`, `segmentsVersionMapMemory`): The memory used by version map for primaries and replicas.
          - `pri.segments.version_map_memory`: The memory used by version map for primaries.
          - `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.
          - `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.
          - `warmer.current` (or `wc`, `warmerCurrent`): The current warmer operations for primaries and replicas.
          - `pri.warmer.current`: The current warmer operations for primaries.
          - `warmer.total` (or `wto`, `warmerTotal`): The total warmer operations for primaries and replicas.
          - `pri.warmer.total`: The total warmer operations for primaries.
          - `warmer.total_time` (or `wtt`, `warmerTotalTime`): The time spent in warmers for primaries and replicas.
          - `pri.warmer.total_time`: The time spent in warmers for primaries.
          - `suggest.current` (or `suc`, `suggestCurrent`): The current suggest operations for primaries and replicas.
          - `pri.suggest.current`: The current suggest operations for primaries.
          - `suggest.time` (or `suti`, `suggestTime`): The time spent in suggest for primaries and replicas.
          - `pri.suggest.time`: The time spent in suggest for primaries.
          - `suggest.total` (or `suto`, `suggestTotal`): The number of suggest operations for primaries and replicas.
          - `pri.suggest.total`: The number of suggest operations for primaries.
          - `memory.total` (or `tm`, `memoryTotal`): The total used memory for primaries and replicas.
          - `pri.memory.total`: The total used memory for primaries.
          - `bulk.total_operations` (or `bto`, `bulkTotalOperation`): The number of bulk shard operations for primaries and replicas.
          - `pri.bulk.total_operations`: The number of bulk shard operations for primaries.
          - `bulk.total_time` (or `btti`, `bulkTotalTime`): The time spent in shard bulk for primaries and replicas.
          - `pri.bulk.total_time`: The time spent in shard bulk for primaries.
          - `bulk.total_size_in_bytes` (or `btsi`, `bulkTotalSizeInBytes`): The total size in bytes of shard bulk for primaries and replicas.
          - `pri.bulk.total_size_in_bytes`: The total size in bytes of shard bulk for primaries.
          - `bulk.avg_time` (or `bati`, `bulkAvgTime`): The average time spent in shard bulk for primaries and replicas.
          - `pri.bulk.avg_time`: The average time spent in shard bulk for primaries.
          - `bulk.avg_size_in_bytes` (or `basi`, `bulkAvgSizeInBytes`): The average size in bytes of shard bulk for primaries and replicas.
          - `pri.bulk.avg_size_in_bytes`: The average size in bytes of shard bulk for primaries.
          - `dense_vector.value_count` (or `dvc`, `denseVectorCount`): The total count of indexed dense vectors for primaries and replicas.
          - `pri.dense_vector.value_count`: The total count of indexed dense vectors for primaries.
          - `sparse_vector.value_count` (or `svc`, `sparseVectorCount`): The total count of indexed sparse vectors for primaries and replicas.
          - `pri.sparse_vector.value_count`: The total count of indexed sparse vectors for primaries.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/cat._types.CatIndicesColumns"
      style: form
    cat.indices-s:
      in: query
      name: s
      description: |-
        List of columns that determine how the table should be sorted.
        Sorting defaults to ascending and can be changed by setting `:asc`
        or `: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-h:
      in: query
      name: h
      description: |+
        Comma-separated list of column names to display.

        Supported values include:
          - `assignment_explanation` (or `ae`): Contains messages relating to the selection of a node.
          - `create_time` (or `ct`, `createTime`): The time when the data frame analytics job was created.
          - `description` (or `d`): A description of a job.
          - `dest_index` (or `di`, `destIndex`): Name of the destination index.
          - `failure_reason` (or `fr`, `failureReason`): Contains messages about the reason why a data frame analytics job failed.
          - `id`: Identifier for the data frame analytics job.
          - `model_memory_limit` (or `mml`, `modelMemoryLimit`): The approximate maximum amount of memory resources that are permitted for
        the data frame analytics job.
          - `node.address` (or `na`, `nodeAddress`): The network address of the node that the data frame analytics job is
        assigned to.
          - `node.ephemeral_id` (or `ne`, `nodeEphemeralId`): The ephemeral ID of the node that the data frame analytics job is assigned
        to.
          - `node.id` (or `ni`, `nodeId`): The unique identifier of the node that the data frame analytics job is
        assigned to.
          - `node.name` (or `nn`, `nodeName`): The name of the node that the data frame analytics job is assigned to.
          - `progress` (or `p`): The progress report of the data frame analytics job by phase.
          - `source_index` (or `si`, `sourceIndex`): Name of the source index.
          - `state` (or `s`): Current state of the data frame analytics job.
          - `type` (or `t`): The type of analysis that the data frame analytics job performs.
          - `version` (or `v`): The Elasticsearch version number in which the data frame analytics job was
        created.

      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
        response.

        Supported values include:
          - `assignment_explanation` (or `ae`): Contains messages relating to the selection of a node.
          - `create_time` (or `ct`, `createTime`): The time when the data frame analytics job was created.
          - `description` (or `d`): A description of a job.
          - `dest_index` (or `di`, `destIndex`): Name of the destination index.
          - `failure_reason` (or `fr`, `failureReason`): Contains messages about the reason why a data frame analytics job failed.
          - `id`: Identifier for the data frame analytics job.
          - `model_memory_limit` (or `mml`, `modelMemoryLimit`): The approximate maximum amount of memory resources that are permitted for
        the data frame analytics job.
          - `node.address` (or `na`, `nodeAddress`): The network address of the node that the data frame analytics job is
        assigned to.
          - `node.ephemeral_id` (or `ne`, `nodeEphemeralId`): The ephemeral ID of the node that the data frame analytics job is assigned
        to.
          - `node.id` (or `ni`, `nodeId`): The unique identifier of the node that the data frame analytics job is
        assigned to.
          - `node.name` (or `nn`, `nodeName`): The name of the node that the data frame analytics job is assigned to.
          - `progress` (or `p`): The progress report of the data frame analytics job by phase.
          - `source_index` (or `si`, `sourceIndex`): Name of the source index.
          - `state` (or `s`): Current state of the data frame analytics job.
          - `type` (or `t`): The type of analysis that the data frame analytics job performs.
          - `version` (or `v`): The Elasticsearch version number in which the data frame analytics job was
        created.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/cat._types.CatDfaColumns"
      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:

        * Contains wildcard expressions and there are no datafeeds that match.
        * Contains the `_all` string or no identifiers and there are no matches.
        * Contains wildcard expressions and there are only partial matches.

        If `true`, the API returns an empty datafeeds array when there are no matches and the subset of results when
        there are partial matches. If `false`, the API returns a 404 status code when there are no matches or only
        partial matches.
      deprecated: false
      schema:
        type: boolean
      style: form
    cat.ml_datafeeds-h:
      in: query
      name: h
      description: |+
        Comma-separated list of column names to display.

        Supported values include:
          - `ae` (or `assignment_explanation`): For started datafeeds only, contains messages relating to the selection of
        a node.
          - `bc` (or `buckets.count`, `bucketsCount`): The number of buckets processed.
          - `id`: A numerical character string that uniquely identifies the datafeed.
          - `na` (or `node.address`, `nodeAddress`): For started datafeeds only, the network address of the node where the
        datafeed is started.
          - `ne` (or `node.ephemeral_id`, `nodeEphemeralId`): For started datafeeds only, the ephemeral ID of the node where the
        datafeed is started.
          - `ni` (or `node.id`, `nodeId`): For started datafeeds only, the unique identifier of the node where the
        datafeed is started.
          - `nn` (or `node.name`, `nodeName`): For started datafeeds only, the name of the node where the datafeed is
        started.
          - `sba` (or `search.bucket_avg`, `searchBucketAvg`): The average search time per bucket, in milliseconds.
          - `sc` (or `search.count`, `searchCount`): The number of searches run by the datafeed.
          - `seah` (or `search.exp_avg_hour`, `searchExpAvgHour`): The exponential average search time per hour, in milliseconds.
          - `st` (or `search.time`, `searchTime`): The total time the datafeed spent searching, in milliseconds.
          - `s` (or `state`): The status of the datafeed: `starting`, `started`, `stopping`, or `stopped`.
        If `starting`, the datafeed has been requested to start but has not yet
        started. If `started`, the datafeed is actively receiving data. If
        `stopping`, the datafeed has been requested to stop gracefully and is
        completing its final action. If `stopped`, the datafeed is stopped and will
        not receive data until it is re-started.

      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.

        Supported values include:
          - `ae` (or `assignment_explanation`): For started datafeeds only, contains messages relating to the selection of
        a node.
          - `bc` (or `buckets.count`, `bucketsCount`): The number of buckets processed.
          - `id`: A numerical character string that uniquely identifies the datafeed.
          - `na` (or `node.address`, `nodeAddress`): For started datafeeds only, the network address of the node where the
        datafeed is started.
          - `ne` (or `node.ephemeral_id`, `nodeEphemeralId`): For started datafeeds only, the ephemeral ID of the node where the
        datafeed is started.
          - `ni` (or `node.id`, `nodeId`): For started datafeeds only, the unique identifier of the node where the
        datafeed is started.
          - `nn` (or `node.name`, `nodeName`): For started datafeeds only, the name of the node where the datafeed is
        started.
          - `sba` (or `search.bucket_avg`, `searchBucketAvg`): The average search time per bucket, in milliseconds.
          - `sc` (or `search.count`, `searchCount`): The number of searches run by the datafeed.
          - `seah` (or `search.exp_avg_hour`, `searchExpAvgHour`): The exponential average search time per hour, in milliseconds.
          - `st` (or `search.time`, `searchTime`): The total time the datafeed spent searching, in milliseconds.
          - `s` (or `state`): The status of the datafeed: `starting`, `started`, `stopping`, or `stopped`.
        If `starting`, the datafeed has been requested to start but has not yet
        started. If `started`, the datafeed is actively receiving data. If
        `stopping`, the datafeed has been requested to stop gracefully and is
        completing its final action. If `stopped`, the datafeed is stopped and will
        not receive data until it is re-started.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/cat._types.CatDatafeedColumns"
      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:

        * Contains wildcard expressions and there are no jobs that match.
        * Contains the `_all` string or no identifiers and there are no matches.
        * Contains wildcard expressions and there are only partial matches.

        If `true`, the API returns an empty jobs array when there are no matches and the subset of results when there
        are partial matches. If `false`, the API returns a 404 status code when there are no matches or only partial
        matches.
      deprecated: false
      schema:
        type: boolean
      style: form
    cat.ml_jobs-h:
      in: query
      name: h
      description: |+
        Comma-separated list of column names to display.

        Supported values include:
          - `assignment_explanation` (or `ae`): For open anomaly detection jobs only, contains messages relating to the
        selection of a node to run the job.
          - `buckets.count` (or `bc`, `bucketsCount`): The number of bucket results produced by the job.
          - `buckets.time.exp_avg` (or `btea`, `bucketsTimeExpAvg`): Exponential moving average of all bucket processing times, in milliseconds.
          - `buckets.time.exp_avg_hour` (or `bteah`, `bucketsTimeExpAvgHour`): Exponentially-weighted moving average of bucket processing times calculated
        in a 1 hour time window, in milliseconds.
          - `buckets.time.max` (or `btmax`, `bucketsTimeMax`): Maximum among all bucket processing times, in milliseconds.
          - `buckets.time.min` (or `btmin`, `bucketsTimeMin`): Minimum among all bucket processing times, in milliseconds.
          - `buckets.time.total` (or `btt`, `bucketsTimeTotal`): Sum of all bucket processing times, in milliseconds.
          - `data.buckets` (or `db`, `dataBuckets`): The number of buckets processed.
          - `data.earliest_record` (or `der`, `dataEarliestRecord`): The timestamp of the earliest chronologically input document.
          - `data.empty_buckets` (or `deb`, `dataEmptyBuckets`): The number of buckets which did not contain any data.
          - `data.input_bytes` (or `dib`, `dataInputBytes`): The number of bytes of input data posted to the anomaly detection job.
          - `data.input_fields` (or `dif`, `dataInputFields`): The total number of fields in input documents posted to the anomaly
        detection job. This count includes fields that are not used in the analysis.
        However, be aware that if you are using a datafeed, it extracts only the
        required fields from the documents it retrieves before posting them to the job.
          - `data.input_records` (or `dir`, `dataInputRecords`): The number of input documents posted to the anomaly detection job.
          - `data.invalid_dates` (or `did`, `dataInvalidDates`): The number of input documents with either a missing date field or a date
        that could not be parsed.
          - `data.last` (or `dl`, `dataLast`): The timestamp at which data was last analyzed, according to server time.
          - `data.last_empty_bucket` (or `dleb`, `dataLastEmptyBucket`): The timestamp of the last bucket that did not contain any data.
          - `data.last_sparse_bucket` (or `dlsb`, `dataLastSparseBucket`): The timestamp of the last bucket that was considered sparse.
          - `data.latest_record` (or `dlr`, `dataLatestRecord`): The timestamp of the latest chronologically input document.
          - `data.missing_fields` (or `dmf`, `dataMissingFields`): The number of input documents that are missing a field that the anomaly
        detection job is configured to analyze. Input documents with missing fields
        are still processed because it is possible that not all fields are missing.
          - `data.out_of_order_timestamps` (or `doot`, `dataOutOfOrderTimestamps`): The number of input documents that have a timestamp chronologically
        preceding the start of the current anomaly detection bucket offset by the
        latency window. This information is applicable only when you provide data
        to the anomaly detection job by using the post data API. These out of order
        documents are discarded, since jobs require time series data to be in
        ascending chronological order.
          - `data.processed_fields` (or `dpf`, `dataProcessedFields`): The total number of fields in all the documents that have been processed by
        the anomaly detection job. Only fields that are specified in the detector
        configuration object contribute to this count. The timestamp is not
        included in this count.
          - `data.processed_records` (or `dpr`, `dataProcessedRecords`): The number of input documents that have been processed by the anomaly
        detection job. This value includes documents with missing fields, since
        they are nonetheless analyzed. If you use datafeeds and have aggregations
        in your search query, the processed record count is the number of
        aggregation results processed, not the number of Elasticsearch documents.
          - `data.sparse_buckets` (or `dsb`, `dataSparseBuckets`): The number of buckets that contained few data points compared to the
        expected number of data points.
          - `forecasts.memory.avg` (or `fmavg`, `forecastsMemoryAvg`): The average memory usage in bytes for forecasts related to the anomaly
        detection job.
          - `forecasts.memory.max` (or `fmmax`, `forecastsMemoryMax`): The maximum memory usage in bytes for forecasts related to the anomaly
        detection job.
          - `forecasts.memory.min` (or `fmmin`, `forecastsMemoryMin`): The minimum memory usage in bytes for forecasts related to the anomaly
        detection job.
          - `forecasts.memory.total` (or `fmt`, `forecastsMemoryTotal`): The total memory usage in bytes for forecasts related to the anomaly
        detection job.
          - `forecasts.records.avg` (or `fravg`, `forecastsRecordsAvg`): The average number of `m`odel_forecast` documents written for forecasts
        related to the anomaly detection job.
          - `forecasts.records.max` (or `frmax`, `forecastsRecordsMax`): The maximum number of `model_forecast` documents written for forecasts
        related to the anomaly detection job.
          - `forecasts.records.min` (or `frmin`, `forecastsRecordsMin`): The minimum number of `model_forecast` documents written for forecasts
        related to the anomaly detection job.
          - `forecasts.records.total` (or `frt`, `forecastsRecordsTotal`): The total number of `model_forecast` documents written for forecasts
        related to the anomaly detection job.
          - `forecasts.time.avg` (or `ftavg`, `forecastsTimeAvg`): The average runtime in milliseconds for forecasts related to the anomaly
        detection job.
          - `forecasts.time.max` (or `ftmax`, `forecastsTimeMax`): The maximum runtime in milliseconds for forecasts related to the anomaly
        detection job.
          - `forecasts.time.min` (or `ftmin`, `forecastsTimeMin`): The minimum runtime in milliseconds for forecasts related to the anomaly
        detection job.
          - `forecasts.time.total` (or `ftt`, `forecastsTimeTotal`): The total runtime in milliseconds for forecasts related to the anomaly
        detection job.
          - `forecasts.total` (or `ft`, `forecastsTotal`): The number of individual forecasts currently available for the job.
          - `id`: Identifier for the anomaly detection job.
          - `model.bucket_allocation_failures` (or `mbaf`, `modelBucketAllocationFailures`): The number of buckets for which new entities in incoming data were not
        processed due to insufficient model memory.
          - `model.by_fields` (or `mbf`, `modelByFields`): The number of by field values that were analyzed by the models. This value
        is cumulative for all detectors in the job.
          - `model.bytes` (or `mb`, `modelBytes`): The number of bytes of memory used by the models. This is the maximum value
        since the last time the model was persisted. If the job is closed, this
        value indicates the latest size.
          - `model.bytes_exceeded` (or `mbe`, `modelBytesExceeded`): The number of bytes over the high limit for memory usage at the last
        allocation failure.
          - `model.categorization_status` (or `mcs`, `modelCategorizationStatus`): The status of categorization for the job: `ok` or `warn`. If `ok`,
        categorization is performing acceptably well (or not being used at all). If
        `warn`, categorization is detecting a distribution of categories that
        suggests the input data is inappropriate for categorization. Problems could
        be that there is only one category, more than 90% of categories are rare,
        the number of categories is greater than 50% of the number of categorized
        documents, there are no frequently matched categories, or more than 50% of
        categories are dead.
          - `model.categorized_doc_count` (or `mcdc`, `modelCategorizedDocCount`): The number of documents that have had a field categorized.
          - `model.dead_category_count` (or `mdcc`, `modelDeadCategoryCount`): The number of categories created by categorization that will never be
        assigned again because another category’s definition makes it a superset of
        the dead category. Dead categories are a side effect of the way
        categorization has no prior training.
          - `model.failed_category_count` (or `mdcc`, `modelFailedCategoryCount`): The number of times that categorization wanted to create a new category but
        couldn’t because the job had hit its model memory limit. This count does
        not track which specific categories failed to be created. Therefore, you
        cannot use this value to determine the number of unique categories that
        were missed.
          - `model.frequent_category_count` (or `mfcc`, `modelFrequentCategoryCount`): The number of categories that match more than 1% of categorized documents.
          - `model.log_time` (or `mlt`, `modelLogTime`): The timestamp when the model stats were gathered, according to server time.
          - `model.memory_limit` (or `mml`, `modelMemoryLimit`): The timestamp when the model stats were gathered, according to server time.
          - `model.memory_status` (or `mms`, `modelMemoryStatus`): The status of the mathematical models: `ok`, `soft_limit`, or `hard_limit`.
        If `ok`, the models stayed below the configured value. If `soft_limit`, the
        models used more than 60% of the configured memory limit and older unused
        models will be pruned to free up space. Additionally, in categorization jobs
        no further category examples will be stored. If `hard_limit`, the models
        used more space than the configured memory limit. As a result, not all
        incoming data was processed.
          - `model.over_fields` (or `mof`, `modelOverFields`): The number of over field values that were analyzed by the models. This
        value is cumulative for all detectors in the job.
          - `model.partition_fields` (or `mpf`, `modelPartitionFields`): The number of partition field values that were analyzed by the models. This
        value is cumulative for all detectors in the job.
          - `model.rare_category_count` (or `mrcc`, `modelRareCategoryCount`): The number of categories that match just one categorized document.
          - `model.timestamp` (or `mt`, `modelTimestamp`): The timestamp of the last record when the model stats were gathered.
          - `model.total_category_count` (or `mtcc`, `modelTotalCategoryCount`): The number of categories created by categorization.
          - `node.address` (or `na`, `nodeAddress`): The network address of the node that runs the job. This information is
        available only for open jobs.
          - `node.ephemeral_id` (or `ne`, `nodeEphemeralId`): The ephemeral ID of the node that runs the job. This information is
        available only for open jobs.
          - `node.id` (or `ni`, `nodeId`): The unique identifier of the node that runs the job. This information is
        available only for open jobs.
          - `node.name` (or `nn`, `nodeName`): The name of the node that runs the job. This information is available only
        for open jobs.
          - `opened_time` (or `ot`): For open jobs only, the elapsed time for which the job has been open.
          - `state` (or `s`): The status of the anomaly detection job: `closed`, `closing`, `failed`,
        `opened`, or `opening`. If `closed`, the job finished successfully with its
        model state persisted. The job must be opened before it can accept further
        data. If `closing`, the job close action is in progress and has not yet
        completed. A closing job cannot accept further data. If `failed`, the job
        did not finish successfully due to an error. This 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. If the job had irrevocably failed, it must be force
        closed and then deleted. If the datafeed can be corrected, the job can be
        closed and then re-opened. If `opened`, the job is available to receive and
        process data. If `opening`, the job open action is in progress and has not
        yet completed.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/cat._types.CatAnomalyDetectorColumns"
      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.

        Supported values include:
          - `assignment_explanation` (or `ae`): For open anomaly detection jobs only, contains messages relating to the
        selection of a node to run the job.
          - `buckets.count` (or `bc`, `bucketsCount`): The number of bucket results produced by the job.
          - `buckets.time.exp_avg` (or `btea`, `bucketsTimeExpAvg`): Exponential moving average of all bucket processing times, in milliseconds.
          - `buckets.time.exp_avg_hour` (or `bteah`, `bucketsTimeExpAvgHour`): Exponentially-weighted moving average of bucket processing times calculated
        in a 1 hour time window, in milliseconds.
          - `buckets.time.max` (or `btmax`, `bucketsTimeMax`): Maximum among all bucket processing times, in milliseconds.
          - `buckets.time.min` (or `btmin`, `bucketsTimeMin`): Minimum among all bucket processing times, in milliseconds.
          - `buckets.time.total` (or `btt`, `bucketsTimeTotal`): Sum of all bucket processing times, in milliseconds.
          - `data.buckets` (or `db`, `dataBuckets`): The number of buckets processed.
          - `data.earliest_record` (or `der`, `dataEarliestRecord`): The timestamp of the earliest chronologically input document.
          - `data.empty_buckets` (or `deb`, `dataEmptyBuckets`): The number of buckets which did not contain any data.
          - `data.input_bytes` (or `dib`, `dataInputBytes`): The number of bytes of input data posted to the anomaly detection job.
          - `data.input_fields` (or `dif`, `dataInputFields`): The total number of fields in input documents posted to the anomaly
        detection job. This count includes fields that are not used in the analysis.
        However, be aware that if you are using a datafeed, it extracts only the
        required fields from the documents it retrieves before posting them to the job.
          - `data.input_records` (or `dir`, `dataInputRecords`): The number of input documents posted to the anomaly detection job.
          - `data.invalid_dates` (or `did`, `dataInvalidDates`): The number of input documents with either a missing date field or a date
        that could not be parsed.
          - `data.last` (or `dl`, `dataLast`): The timestamp at which data was last analyzed, according to server time.
          - `data.last_empty_bucket` (or `dleb`, `dataLastEmptyBucket`): The timestamp of the last bucket that did not contain any data.
          - `data.last_sparse_bucket` (or `dlsb`, `dataLastSparseBucket`): The timestamp of the last bucket that was considered sparse.
          - `data.latest_record` (or `dlr`, `dataLatestRecord`): The timestamp of the latest chronologically input document.
          - `data.missing_fields` (or `dmf`, `dataMissingFields`): The number of input documents that are missing a field that the anomaly
        detection job is configured to analyze. Input documents with missing fields
        are still processed because it is possible that not all fields are missing.
          - `data.out_of_order_timestamps` (or `doot`, `dataOutOfOrderTimestamps`): The number of input documents that have a timestamp chronologically
        preceding the start of the current anomaly detection bucket offset by the
        latency window. This information is applicable only when you provide data
        to the anomaly detection job by using the post data API. These out of order
        documents are discarded, since jobs require time series data to be in
        ascending chronological order.
          - `data.processed_fields` (or `dpf`, `dataProcessedFields`): The total number of fields in all the documents that have been processed by
        the anomaly detection job. Only fields that are specified in the detector
        configuration object contribute to this count. The timestamp is not
        included in this count.
          - `data.processed_records` (or `dpr`, `dataProcessedRecords`): The number of input documents that have been processed by the anomaly
        detection job. This value includes documents with missing fields, since
        they are nonetheless analyzed. If you use datafeeds and have aggregations
        in your search query, the processed record count is the number of
        aggregation results processed, not the number of Elasticsearch documents.
          - `data.sparse_buckets` (or `dsb`, `dataSparseBuckets`): The number of buckets that contained few data points compared to the
        expected number of data points.
          - `forecasts.memory.avg` (or `fmavg`, `forecastsMemoryAvg`): The average memory usage in bytes for forecasts related to the anomaly
        detection job.
          - `forecasts.memory.max` (or `fmmax`, `forecastsMemoryMax`): The maximum memory usage in bytes for forecasts related to the anomaly
        detection job.
          - `forecasts.memory.min` (or `fmmin`, `forecastsMemoryMin`): The minimum memory usage in bytes for forecasts related to the anomaly
        detection job.
          - `forecasts.memory.total` (or `fmt`, `forecastsMemoryTotal`): The total memory usage in bytes for forecasts related to the anomaly
        detection job.
          - `forecasts.records.avg` (or `fravg`, `forecastsRecordsAvg`): The average number of `m`odel_forecast` documents written for forecasts
        related to the anomaly detection job.
          - `forecasts.records.max` (or `frmax`, `forecastsRecordsMax`): The maximum number of `model_forecast` documents written for forecasts
        related to the anomaly detection job.
          - `forecasts.records.min` (or `frmin`, `forecastsRecordsMin`): The minimum number of `model_forecast` documents written for forecasts
        related to the anomaly detection job.
          - `forecasts.records.total` (or `frt`, `forecastsRecordsTotal`): The total number of `model_forecast` documents written for forecasts
        related to the anomaly detection job.
          - `forecasts.time.avg` (or `ftavg`, `forecastsTimeAvg`): The average runtime in milliseconds for forecasts related to the anomaly
        detection job.
          - `forecasts.time.max` (or `ftmax`, `forecastsTimeMax`): The maximum runtime in milliseconds for forecasts related to the anomaly
        detection job.
          - `forecasts.time.min` (or `ftmin`, `forecastsTimeMin`): The minimum runtime in milliseconds for forecasts related to the anomaly
        detection job.
          - `forecasts.time.total` (or `ftt`, `forecastsTimeTotal`): The total runtime in milliseconds for forecasts related to the anomaly
        detection job.
          - `forecasts.total` (or `ft`, `forecastsTotal`): The number of individual forecasts currently available for the job.
          - `id`: Identifier for the anomaly detection job.
          - `model.bucket_allocation_failures` (or `mbaf`, `modelBucketAllocationFailures`): The number of buckets for which new entities in incoming data were not
        processed due to insufficient model memory.
          - `model.by_fields` (or `mbf`, `modelByFields`): The number of by field values that were analyzed by the models. This value
        is cumulative for all detectors in the job.
          - `model.bytes` (or `mb`, `modelBytes`): The number of bytes of memory used by the models. This is the maximum value
        since the last time the model was persisted. If the job is closed, this
        value indicates the latest size.
          - `model.bytes_exceeded` (or `mbe`, `modelBytesExceeded`): The number of bytes over the high limit for memory usage at the last
        allocation failure.
          - `model.categorization_status` (or `mcs`, `modelCategorizationStatus`): The status of categorization for the job: `ok` or `warn`. If `ok`,
        categorization is performing acceptably well (or not being used at all). If
        `warn`, categorization is detecting a distribution of categories that
        suggests the input data is inappropriate for categorization. Problems could
        be that there is only one category, more than 90% of categories are rare,
        the number of categories is greater than 50% of the number of categorized
        documents, there are no frequently matched categories, or more than 50% of
        categories are dead.
          - `model.categorized_doc_count` (or `mcdc`, `modelCategorizedDocCount`): The number of documents that have had a field categorized.
          - `model.dead_category_count` (or `mdcc`, `modelDeadCategoryCount`): The number of categories created by categorization that will never be
        assigned again because another category’s definition makes it a superset of
        the dead category. Dead categories are a side effect of the way
        categorization has no prior training.
          - `model.failed_category_count` (or `mdcc`, `modelFailedCategoryCount`): The number of times that categorization wanted to create a new category but
        couldn’t because the job had hit its model memory limit. This count does
        not track which specific categories failed to be created. Therefore, you
        cannot use this value to determine the number of unique categories that
        were missed.
          - `model.frequent_category_count` (or `mfcc`, `modelFrequentCategoryCount`): The number of categories that match more than 1% of categorized documents.
          - `model.log_time` (or `mlt`, `modelLogTime`): The timestamp when the model stats were gathered, according to server time.
          - `model.memory_limit` (or `mml`, `modelMemoryLimit`): The timestamp when the model stats were gathered, according to server time.
          - `model.memory_status` (or `mms`, `modelMemoryStatus`): The status of the mathematical models: `ok`, `soft_limit`, or `hard_limit`.
        If `ok`, the models stayed below the configured value. If `soft_limit`, the
        models used more than 60% of the configured memory limit and older unused
        models will be pruned to free up space. Additionally, in categorization jobs
        no further category examples will be stored. If `hard_limit`, the models
        used more space than the configured memory limit. As a result, not all
        incoming data was processed.
          - `model.over_fields` (or `mof`, `modelOverFields`): The number of over field values that were analyzed by the models. This
        value is cumulative for all detectors in the job.
          - `model.partition_fields` (or `mpf`, `modelPartitionFields`): The number of partition field values that were analyzed by the models. This
        value is cumulative for all detectors in the job.
          - `model.rare_category_count` (or `mrcc`, `modelRareCategoryCount`): The number of categories that match just one categorized document.
          - `model.timestamp` (or `mt`, `modelTimestamp`): The timestamp of the last record when the model stats were gathered.
          - `model.total_category_count` (or `mtcc`, `modelTotalCategoryCount`): The number of categories created by categorization.
          - `node.address` (or `na`, `nodeAddress`): The network address of the node that runs the job. This information is
        available only for open jobs.
          - `node.ephemeral_id` (or `ne`, `nodeEphemeralId`): The ephemeral ID of the node that runs the job. This information is
        available only for open jobs.
          - `node.id` (or `ni`, `nodeId`): The unique identifier of the node that runs the job. This information is
        available only for open jobs.
          - `node.name` (or `nn`, `nodeName`): The name of the node that runs the job. This information is available only
        for open jobs.
          - `opened_time` (or `ot`): For open jobs only, the elapsed time for which the job has been open.
          - `state` (or `s`): The status of the anomaly detection job: `closed`, `closing`, `failed`,
        `opened`, or `opening`. If `closed`, the job finished successfully with its
        model state persisted. The job must be opened before it can accept further
        data. If `closing`, the job close action is in progress and has not yet
        completed. A closing job cannot accept further data. If `failed`, the job
        did not finish successfully due to an error. This 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. If the job had irrevocably failed, it must be force
        closed and then deleted. If the datafeed can be corrected, the job can be
        closed and then re-opened. If `opened`, the job is available to receive and
        process data. If `opening`, the job open action is in progress and has not
        yet completed.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/cat._types.CatAnomalyDetectorColumns"
      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.
        If `true`, the API returns an empty array when there are no matches and the subset of results when there are partial matches.
        If `false`, the API returns a 404 status code when there are no matches or only partial matches.
      deprecated: false
      schema:
        type: boolean
      style: form
    cat.ml_trained_models-h:
      in: query
      name: h
      description: |+
        A comma-separated list of column names to display.

        Supported values include:
          - `create_time` (or `ct`): The time when the trained model was created.
          - `created_by` (or `c`, `createdBy`): Information on the creator of the trained model.
          - `data_frame_analytics_id` (or `df`, `dataFrameAnalytics`, `dfid`): Identifier for the data frame analytics job that created the model. Only
        displayed if it is still available.
          - `description` (or `d`): The description of the trained model.
          - `heap_size` (or `hs`, `modelHeapSize`): The estimated heap size to keep the trained model in memory.
          - `id`: Identifier for the trained model.
          - `ingest.count` (or `ic`, `ingestCount`): The total number of documents that are processed by the model.
          - `ingest.current` (or `icurr`, `ingestCurrent`): The total number of document that are currently being handled by the
        trained model.
          - `ingest.failed` (or `if`, `ingestFailed`): The total number of failed ingest attempts with the trained model.
          - `ingest.pipelines` (or `ip`, `ingestPipelines`): The total number of ingest pipelines that are referencing the trained
        model.
          - `ingest.time` (or `it`, `ingestTime`): The total time that is spent processing documents with the trained model.
          - `license` (or `l`): The license level of the trained model.
          - `operations` (or `o`, `modelOperations`): The estimated number of operations to use the trained model. This number
        helps measuring the computational complexity of the model.
          - `version` (or `v`): The Elasticsearch version number in which the trained model was created.

      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.

        Supported values include:
          - `create_time` (or `ct`): The time when the trained model was created.
          - `created_by` (or `c`, `createdBy`): Information on the creator of the trained model.
          - `data_frame_analytics_id` (or `df`, `dataFrameAnalytics`, `dfid`): Identifier for the data frame analytics job that created the model. Only
        displayed if it is still available.
          - `description` (or `d`): The description of the trained model.
          - `heap_size` (or `hs`, `modelHeapSize`): The estimated heap size to keep the trained model in memory.
          - `id`: Identifier for the trained model.
          - `ingest.count` (or `ic`, `ingestCount`): The total number of documents that are processed by the model.
          - `ingest.current` (or `icurr`, `ingestCurrent`): The total number of document that are currently being handled by the
        trained model.
          - `ingest.failed` (or `if`, `ingestFailed`): The total number of failed ingest attempts with the trained model.
          - `ingest.pipelines` (or `ip`, `ingestPipelines`): The total number of ingest pipelines that are referencing the trained
        model.
          - `ingest.time` (or `it`, `ingestTime`): The total time that is spent processing documents with the trained model.
          - `license` (or `l`): The license level of the trained model.
          - `operations` (or `o`, `modelOperations`): The estimated number of operations to use the trained model. This number
        helps measuring the computational complexity of the model.
          - `version` (or `v`): The Elasticsearch version number in which the trained model was created.

      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.transforms-transform_id:
      in: path
      name: transform_id
      description: |-
        A transform identifier or a wildcard expression.
        If 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.
        If `true`, it returns an empty transforms array when there are no matches and the subset of results when there are partial matches.
        If `false`, the request returns a 404 status code when there are no matches or only partial matches.
      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.

        Supported values include:
          - `changes_last_detection_time` (or `cldt`): The timestamp when changes were last detected in the source indices.
          - `checkpoint` (or `cp`): The sequence number for the checkpoint.
          - `checkpoint_duration_time_exp_avg` (or `cdtea`, `checkpointTimeExpAvg`): Exponential moving average of the duration of the checkpoint, in
        milliseconds.
          - `checkpoint_progress` (or `c`, `checkpointProgress`): The progress of the next checkpoint that is currently in progress.
          - `create_time` (or `ct`, `createTime`): The time the transform was created.
          - `delete_time` (or `dtime`): The amount of time spent deleting, in milliseconds.
          - `description` (or `d`): The description of the transform.
          - `dest_index` (or `di`, `destIndex`): The destination index for the transform. The mappings of the destination
        index are deduced based on the source fields when possible. If alternate
        mappings are required, use the Create index API prior to starting the
        transform.
          - `documents_deleted` (or `docd`): The number of documents that have been deleted from the destination index
        due to the retention policy for this transform.
          - `documents_indexed` (or `doci`): The number of documents that have been indexed into the destination index
        for the transform.
          - `docs_per_second` (or `dps`): Specifies a limit on the number of input documents per second. This setting
        throttles the transform by adding a wait time between search requests. The
        default value is `null`, which disables throttling.
          - `documents_processed` (or `docp`): The number of documents that have been processed from the source index of
        the transform.
          - `frequency` (or `f`): The interval between checks for changes in the source indices when the
        transform is running continuously. Also determines the retry interval in
        the event of transient failures while the transform is searching or
        indexing. The minimum value is `1s` and the maximum is `1h`. The default
        value is `1m`.
          - `id`: Identifier for the transform.
          - `index_failure` (or `if`): The number of indexing failures.
          - `index_time` (or `itime`): The amount of time spent indexing, in milliseconds.
          - `index_total` (or `it`): The number of index operations.
          - `indexed_documents_exp_avg` (or `idea`): Exponential moving average of the number of new documents that have been
        indexed.
          - `last_search_time` (or `lst`, `lastSearchTime`): The timestamp of the last search in the source indices. This field is only
        shown if the transform is running.
          - `max_page_search_size` (or `mpsz`): Defines the initial page size to use for the composite aggregation for each
        checkpoint. If circuit breaker exceptions occur, the page size is
        dynamically adjusted to a lower value. The minimum value is `10` and the
        maximum is `65,536`. The default value is `500`.
          - `pages_processed` (or `pp`): The number of search or bulk index operations processed. Documents are
        processed in batches instead of individually.
          - `pipeline` (or `p`): The unique identifier for an ingest pipeline.
          - `processed_documents_exp_avg` (or `pdea`): Exponential moving average of the number of documents that have been
        processed.
          - `processing_time` (or `pt`): The amount of time spent processing results, in milliseconds.
          - `reason` (or `r`): If a transform has a `failed` state, this property provides details about
        the reason for the failure.
          - `search_failure` (or `sf`): The number of search failures.
          - `search_time` (or `stime`): The amount of time spent searching, in milliseconds.
          - `search_total` (or `st`): The number of search operations on the source index for the transform.
          - `source_index` (or `si`, `sourceIndex`): The source indices for the transform. It can be a single index, an index
        pattern (for example, `"my-index-*"`), an array of indices (for example,
        `["my-index-000001", "my-index-000002"]`), or an array of index patterns
        (for example, `["my-index-*", "my-other-index-*"]`. For remote indices use
        the syntax `"remote_name:index_name"`. If any indices are in remote
        clusters then the master node and at least one transform node must have the
        `remote_cluster_client` node role.
          - `state` (or `s`): The status of the transform, which can be one of the following values:

        * `aborting`: The transform is aborting.
        * `failed`: The transform failed. For more information about the failure,
        check the reason field.
        * `indexing`: The transform is actively processing data and creating new
        documents.
        * `started`: The transform is running but not actively indexing data.
        * `stopped`: The transform is stopped.
        * `stopping`: The transform is stopping.
          - `transform_type` (or `tt`): Indicates the type of transform: `batch` or `continuous`.
          - `trigger_count` (or `tc`): The number of times the transform has been triggered by the scheduler. For
        example, the scheduler triggers the transform indexer to check for updates
        or ingest new data at an interval specified in the `frequency` property.
          - `version` (or `v`): The version of Elasticsearch that existed on the node when the transform
        was created.

      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.

        Supported values include:
          - `changes_last_detection_time` (or `cldt`): The timestamp when changes were last detected in the source indices.
          - `checkpoint` (or `cp`): The sequence number for the checkpoint.
          - `checkpoint_duration_time_exp_avg` (or `cdtea`, `checkpointTimeExpAvg`): Exponential moving average of the duration of the checkpoint, in
        milliseconds.
          - `checkpoint_progress` (or `c`, `checkpointProgress`): The progress of the next checkpoint that is currently in progress.
          - `create_time` (or `ct`, `createTime`): The time the transform was created.
          - `delete_time` (or `dtime`): The amount of time spent deleting, in milliseconds.
          - `description` (or `d`): The description of the transform.
          - `dest_index` (or `di`, `destIndex`): The destination index for the transform. The mappings of the destination
        index are deduced based on the source fields when possible. If alternate
        mappings are required, use the Create index API prior to starting the
        transform.
          - `documents_deleted` (or `docd`): The number of documents that have been deleted from the destination index
        due to the retention policy for this transform.
          - `documents_indexed` (or `doci`): The number of documents that have been indexed into the destination index
        for the transform.
          - `docs_per_second` (or `dps`): Specifies a limit on the number of input documents per second. This setting
        throttles the transform by adding a wait time between search requests. The
        default value is `null`, which disables throttling.
          - `documents_processed` (or `docp`): The number of documents that have been processed from the source index of
        the transform.
          - `frequency` (or `f`): The interval between checks for changes in the source indices when the
        transform is running continuously. Also determines the retry interval in
        the event of transient failures while the transform is searching or
        indexing. The minimum value is `1s` and the maximum is `1h`. The default
        value is `1m`.
          - `id`: Identifier for the transform.
          - `index_failure` (or `if`): The number of indexing failures.
          - `index_time` (or `itime`): The amount of time spent indexing, in milliseconds.
          - `index_total` (or `it`): The number of index operations.
          - `indexed_documents_exp_avg` (or `idea`): Exponential moving average of the number of new documents that have been
        indexed.
          - `last_search_time` (or `lst`, `lastSearchTime`): The timestamp of the last search in the source indices. This field is only
        shown if the transform is running.
          - `max_page_search_size` (or `mpsz`): Defines the initial page size to use for the composite aggregation for each
        checkpoint. If circuit breaker exceptions occur, the page size is
        dynamically adjusted to a lower value. The minimum value is `10` and the
        maximum is `65,536`. The default value is `500`.
          - `pages_processed` (or `pp`): The number of search or bulk index operations processed. Documents are
        processed in batches instead of individually.
          - `pipeline` (or `p`): The unique identifier for an ingest pipeline.
          - `processed_documents_exp_avg` (or `pdea`): Exponential moving average of the number of documents that have been
        processed.
          - `processing_time` (or `pt`): The amount of time spent processing results, in milliseconds.
          - `reason` (or `r`): If a transform has a `failed` state, this property provides details about
        the reason for the failure.
          - `search_failure` (or `sf`): The number of search failures.
          - `search_time` (or `stime`): The amount of time spent searching, in milliseconds.
          - `search_total` (or `st`): The number of search operations on the source index for the transform.
          - `source_index` (or `si`, `sourceIndex`): The source indices for the transform. It can be a single index, an index
        pattern (for example, `"my-index-*"`), an array of indices (for example,
        `["my-index-000001", "my-index-000002"]`), or an array of index patterns
        (for example, `["my-index-*", "my-other-index-*"]`. For remote indices use
        the syntax `"remote_name:index_name"`. If any indices are in remote
        clusters then the master node and at least one transform node must have the
        `remote_cluster_client` node role.
          - `state` (or `s`): The status of the transform, which can be one of the following values:

        * `aborting`: The transform is aborting.
        * `failed`: The transform failed. For more information about the failure,
        check the reason field.
        * `indexing`: The transform is actively processing data and creating new
        documents.
        * `started`: The transform is running but not actively indexing data.
        * `stopped`: The transform is stopped.
        * `stopping`: The transform is stopping.
          - `transform_type` (or `tt`): Indicates the type of transform: `batch` or `continuous`.
          - `trigger_count` (or `tc`): The number of times the transform has been triggered by the scheduler. For
        example, the scheduler triggers the transform indexer to check for updates
        or ingest new data at an interval specified in the `frequency` property.
          - `version` (or `v`): The version of Elasticsearch that existed on the node when the transform
        was created.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/cat._types.CatTransformColumns"
      style: form
    cat.transforms-size:
      in: query
      name: size
      description: The maximum number of transforms to obtain.
      deprecated: false
      schema:
        type: number
      style: form
    clear_scroll-scroll_id:
      in: path
      name: scroll_id
      description: |-
        A comma-separated list of scroll IDs to clear.
        To clear all scroll IDs, use `_all`.
        IMPORTANT: 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.get_component_template-name:
      in: path
      name: name
      description: Name of component template to retrieve. Wildcard (`*`) 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-settings_filter:
      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
      style: form
    cluster.get_component_template-include_defaults:
      in: query
      name: include_defaults
      description: Return all default configurations for the component template
      deprecated: false
      schema:
        type: boolean
      x-state: Generally available
      style: form
    cluster.get_component_template-local:
      in: query
      name: local
      description: |-
        If `true`, the request retrieves information from the local node only.
        If `false`, information is retrieved from the master node.
      deprecated: true
      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.
        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.put_component_template-name:
      in: path
      name: name
      description: |-
        Name of the component template to create.
        Elasticsearch includes the following built-in component templates: `logs-mappings`; `logs-settings`; `metrics-mappings`; `metrics-settings`;`synthetics-mapping`; `synthetics-settings`.
        Elastic Agent uses these templates to configure backing indices for its data streams.
        If you use Elastic Agent and want to overwrite one of these templates, set the `version` for your replacement template higher than the current version.
        If you don’t use Elastic Agent and want to disable all built-in component and index templates, set `stack.templates.enabled` to `false` using the cluster update settings API.
      required: 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-cause:
      in: query
      name: cause
      description: User defined reason for create the component template.
      deprecated: false
      schema:
        type: string
      style: form
    cluster.put_component_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
    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.
        It supports wildcards (`*`).
        To 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.
        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
    count-analyzer:
      in: query
      name: analyzer
      description: |-
        The analyzer to use for the query string.
        This 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.
        This 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`.
        This 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.
        This 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.
        If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
        It supports comma-separated values, such as `open,hidden`.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      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.
        This 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.
        By 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.
        If a query reaches this limit, Elasticsearch terminates the query early.
        Elasticsearch collects documents before sorting.

        IMPORTANT: Use with caution.
        Elasticsearch applies this parameter to each shard handling the request.
        When possible, let Elasticsearch perform early termination automatically.
        Avoid 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.
        To automatically generate a document ID, use the `POST /<target>/_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.
        If the target doesn't exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream.
        If the target doesn't exist and doesn’t match a data stream template, this request creates the index.
      required: true
      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.IndexName"
      style: simple
    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-pipeline:
      in: query
      name: pipeline
      description: |-
        The ID of the pipeline to use to preprocess incoming documents.
        If the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.
        If 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.
        If `wait_for`, it waits for a refresh to make this operation visible to search.
        If `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.
        Elasticsearch waits for at least the specified timeout period before failing.
        The actual wait time could be longer, particularly when multiple waits occur.

        This parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs.
        Some reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation.
        By default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error.
        The 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.
        It 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.

        Supported values include:
          - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
          - `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.
          - `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.
        NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
        If used incorrectly, it can result in loss of data.

      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.
        You can set it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
        The 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.
        To 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: Comma-separated list of index names 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
      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
    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.
        This 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: |+
        Whether to expand wildcard expression to concrete indices that are open, closed or both.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.ExpandWildcards"
      style: form
    eql.search-ccs_minimize_roundtrips:
      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
    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.
        Only 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.
        This 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.
        This 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`.
        This 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.
        This 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.
        This 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.
        It 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.
        You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
        If 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.
        If this parameter is specified, only these source fields are returned.
        You can exclude fields from this subset using the `_source_excludes` query parameter.
        If the `_source` parameter is `false`, this parameter is ignored.
      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,
        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
    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`.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      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:
        oneOf:
        - type: string
        - type: array
          items:
            type: string
      x-state: Generally available
      style: form
    field_caps-types:
      in: query
      name: types
      description: |-
        A comma-separated list of field types to include.
        Any fields that do not match one of these types will be excluded from the results.
        It defaults to empty, meaning that all field types are returned.
      deprecated: false
      schema:
        type: array
        items:
          type: string
      x-state: Generally available
      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
      x-state: Generally available
      style: form
    index-id:
      in: path
      name: id
      description: |-
        A unique identifier for the document.
        To automatically generate a document ID, use the `POST /<target>/_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.
        If the target doesn't exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream.
        If the target doesn't exist and doesn't match a data stream template, this request creates the index.
        You 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).
        If a document with the specified `_id` already exists, the indexing operation will fail.
        The behavior is the same as using the `<index>/_create` endpoint.
        If a document ID is specified, this paramater defaults to `index`.
        Otherwise, it defaults to `create`.
        If the request targets a data stream, an `op_type` of `create` is required.

        Supported values include:
          - `index`: Overwrite any documents that already exist.
          - `create`: Only index documents that do not already exist.

      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.
        If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request.
        If a final pipeline is configured it will always run, regardless of the value of this parameter.
      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.
        If `wait_for`, it waits for a refresh to make this operation visible to search.
        If `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.

        This parameter is useful for situations where the primary shard assigned to perform the operation might not be available when the operation runs.
        Some reasons for this might be that the primary shard is currently recovering from a gateway or undergoing relocation.
        By default, the operation will wait on the primary shard to become available for at least 1 minute before failing and responding with an error.
        The 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.
        It 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.

        Supported values include:
          - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
          - `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.
          - `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.
        NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
        If used incorrectly, it can result in loss of data.

      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.
        You can set it to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`).
        The 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
    index-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
    indices.analyze-index:
      in: path
      name: index
      description: |-
        Index used to derive the analyzer.
        If specified, the `analyzer` or field parameter overrides this value.
        If 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.
        If specified, the `analyzer` or field parameter overrides this value.
        If 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.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.delete_alias-index:
      in: path
      name: index
      description: |-
        Comma-separated list of data streams or indices used to limit the request.
        Supports 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.
        Supports 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.
        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.delete_alias-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
    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 (`*`).
        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
    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.
        This 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.
        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`.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      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.
        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_alias-name:
      in: path
      name: name
      description: |-
        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
    indices.get_alias-index:
      in: path
      name: index
      description: |-
        Comma-separated list of data streams or indices 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
    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.
        This 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.
        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`.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      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.
        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-name:
      in: path
      name: name
      description: |-
        Comma-separated list of data stream names used to limit the request.
        Wildcard (`*`) 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.
        Supports comma-separated values, such as `open,hidden`.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      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
      x-state: Generally available
      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_index_template-name:
      in: path
      name: name
      description: Name of index template to retrieve. 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: true
      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
      x-state: Generally available
      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.
        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
    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.
        This 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.
        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`.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      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.
        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_settings-index:
      in: path
      name: index
      description: |-
        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
    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
        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
    indices.get_settings-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 determines whether wildcard expressions match hidden data streams.
        Supports comma-separated values, such as `open,hidden`.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      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
        `false`, information is retrieved from the master node.
      deprecated: true
      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
        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.
        Supports wildcards (`*`).
        Wildcard 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.
        If the alias doesn’t exist, the request creates it.
        Index 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.
        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.put_alias-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
    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.
        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.put_index_template-cause:
      in: query
      name: cause
      description: User defined reason for creating or 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.
        This 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.
        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`.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      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.
        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.put_mapping-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
    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
        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
    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
        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
    indices.put_settings-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 determines whether wildcard expressions match
        hidden data streams. Supports comma-separated values, such as
        `open,hidden`.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      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
        received before the timeout expires, the request fails and returns an
        error.
      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.
        If set to `true` the indices to which the settings are being applied
        will 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
         timeout expires, the request fails and returns an error.
      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.Duration"
      style: form
    indices.refresh-index:
      in: path
      name: index
      description: |-
        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
    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.
        This behavior applies even if the request targets other open indices.
      deprecated: false
      schema:
        type: boolean
      style: form
    indices.refresh-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 determines whether wildcard expressions match hidden data streams.
        Supports comma-separated values, such as `open,hidden`.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.ExpandWildcards"
      style: form
    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.resolve_index-name:
      in: path
      name: name
      description: |-
        Comma-separated name(s) or index pattern(s) of the indices, aliases, and data streams to resolve.
        Resources on remote clusters can be specified using the `<cluster>`:`<name>` syntax.
      required: true
      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.Names"
      style: simple
    indices.resolve_index-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 determines whether wildcard expressions match hidden data streams.
        Supports comma-separated values, such as `open,hidden`.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.ExpandWildcards"
      style: form
    indices.resolve_index-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.resolve_index-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
    indices.resolve_index-mode:
      in: query
      name: mode
      description: |+
        Filter indices by index mode - standard, lookup, time_series, etc. Comma-separated list of IndexMode. Empty means no filter.

        Supported values include: `standard`, `time_series`, `logsdb`, `lookup`

      deprecated: false
      schema:
        oneOf:
        - "$ref": "#/components/schemas/indices._types.IndexMode"
        - type: array
          items:
            "$ref": "#/components/schemas/indices._types.IndexMode"
      x-state: Generally available
      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.
        Supports date math.
        Data 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.
        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.rollover-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
    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.
        Set 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.
        Only allowed on data streams.
      deprecated: false
      schema:
        type: boolean
      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
        this 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
      x-state: Generally available
      style: form
    indices.validate_query-index:
      in: path
      name: index
      description: |-
        Comma-separated list of data streams, indices, and aliases to search.
        Supports wildcards (`*`).
        To 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.
        This 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
      style: form
    indices.validate_query-analyzer:
      in: query
      name: analyzer
      description: |-
        Analyzer to use for the query string.
        This parameter can only be used when the `q` query string parameter is specified.
      deprecated: false
      schema:
        type: string
      style: form
    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.
        This 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.
        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`.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      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
      style: form
    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
      style: form
    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
      style: form
    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, 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
    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. 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
    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.put-timeout:
      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
    ingest.get_pipeline-id:
      in: path
      name: id
      description: |-
        Comma-separated list of pipeline IDs to retrieve.
        Wildcard (`*`) expressions are supported.
        To 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.
        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
    ingest.get_pipeline-summary:
      in: query
      name: summary
      description: Return pipelines without their definitions
      deprecated: false
      schema:
        type: boolean
      style: form
    ingest.simulate-id:
      in: path
      name: id
      description: |-
        The pipeline to test.
        If 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
      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
      style: form
    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.
        You 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.
        If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter.
        If the `_source` parameter is `false`, this parameter is ignored.
      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
    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
    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_data_frame_analytics-id:
      in: path
      name: id
      description: |-
        Identifier for the data frame analytics job. If you do not specify this
        option, the API returns information for the first hundred data frame
        analytics jobs.
      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:

        1. Contains wildcard expressions and there are no data frame analytics
        jobs that match.
        2. Contains the `_all` string or no identifiers and there are no matches.
        3. Contains wildcard expressions and there are only partial matches.

        The default value returns an empty data_frame_analytics array when there
        are no matches and the subset of results when there are partial matches.
        If this parameter is `false`, the request returns a 404 status code when
        there are no matches or only partial matches.
      deprecated: false
      schema:
        type: boolean
      style: form
    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
    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
    ml.get_data_frame_analytics-exclude_generated:
      in: query
      name: exclude_generated
      description: |-
        Indicates if certain fields should be removed from the configuration on
        retrieval. This allows the configuration to be in an acceptable format to
        be retrieved and then added to another cluster.
      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
        option, the API returns information for the first hundred data frame
        analytics 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:

        1. Contains wildcard expressions and there are no data frame analytics
        jobs that match.
        2. Contains the `_all` string or no identifiers and there are no matches.
        3. Contains wildcard expressions and there are only partial matches.

        The default value returns an empty data_frame_analytics array when there
        are no matches and the subset of results when there are partial matches.
        If this parameter is `false`, the request returns a 404 status code when
        there are no matches or only partial matches.
      deprecated: false
      schema:
        type: boolean
      style: form
    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
      style: form
    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
      style: form
    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
        wildcard expression. If you do not specify one of these options, the API
        returns 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:

        1. Contains wildcard expressions and there are no datafeeds that match.
        2. Contains the `_all` string or no identifiers and there are no matches.
        3. Contains wildcard expressions and there are only partial matches.

        The default value is `true`, which returns an empty `datafeeds` array
        when there are no matches and the subset of results when there are
        partial matches. If this parameter is `false`, the request returns a
        `404` status code when there are no matches or only partial matches.
      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
        wildcard expression. If you do not specify one of these options, the API
        returns 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:

        1. Contains wildcard expressions and there are no datafeeds that match.
        2. Contains the `_all` string or no identifiers and there are no matches.
        3. Contains wildcard expressions and there are only partial matches.

        The default value is `true`, which returns an empty `datafeeds` array
        when there are no matches and the subset of results when there are
        partial matches. If this parameter is `false`, the request returns a
        `404` status code when there are no matches or only partial matches.
      deprecated: false
      schema:
        type: boolean
      style: form
    ml.get_datafeeds-exclude_generated:
      in: query
      name: exclude_generated
      description: |-
        Indicates if certain fields should be removed from the configuration on
        retrieval. This allows the configuration to be in an acceptable format to
        be retrieved and then added to another cluster.
      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
      style: form
    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_job_stats-job_id:
      in: path
      name: job_id
      description: |-
        Identifier for the anomaly detection job. It can be a job identifier, a
        group name, a comma-separated list of jobs, or a wildcard expression. If
        you do not specify one of these options, the API returns information for
        all anomaly detection jobs.
      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:

        1. Contains wildcard expressions and there are no jobs that match.
        2. Contains the _all string or no identifiers and there are no matches.
        3. Contains wildcard expressions and there are only partial matches.

        If `true`, the API returns an empty `jobs` array when
        there are no matches and the subset of results when there are partial
        matches. If `false`, the API returns a `404` status
        code when there are no matches or only partial matches.
      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
        group name, or a wildcard expression. If you do not specify one of these
        options, 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:

        1. Contains wildcard expressions and there are no jobs that match.
        2. Contains the _all string or no identifiers and there are no matches.
        3. Contains wildcard expressions and there are only partial matches.

        The default value is `true`, which returns an empty `jobs` array when
        there are no matches and the subset of results when there are partial
        matches. If this parameter is `false`, the request returns a `404` status
        code when there are no matches or only partial matches.
      deprecated: false
      schema:
        type: boolean
      style: form
    ml.get_jobs-exclude_generated:
      in: query
      name: exclude_generated
      description: |-
        Indicates if certain fields should be removed from the configuration on
        retrieval. This allows the configuration to be in an acceptable format to
        be retrieved and then added to another cluster.
      deprecated: false
      schema:
        type: boolean
      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
        group name, a comma-separated list of jobs or groups, or a wildcard
        expression.

        You can summarize the bucket results for all anomaly detection jobs by
        using `_all` or by specifying `*` as the `<job_id>`.
      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:

        1. Contains wildcard expressions and there are no jobs that match.
        2. Contains the `_all` string or no identifiers and there are no matches.
        3. Contains wildcard expressions and there are only partial matches.

        If `true`, the request returns an empty `jobs` array when there are no
        matches and the subset of results when there are partial matches. If this
        parameter is `false`, the request returns a `404` status code when there
        are no matches or only partial matches.
      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
        bucket span of the specified anomaly detection jobs, which is the default
        value.

        By default, an overall bucket has a span equal to the largest bucket span
        of the specified anomaly detection jobs. To override that behavior, use
        the optional `bucket_span` parameter.
      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
      style: form
    ml.get_overall_buckets-overall_score:
      in: query
      name: overall_score
      description: |-
        Returns overall buckets with overall scores greater than or equal to this
        value.
      deprecated: false
      schema:
        type: number
      style: form
    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
    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
        `overall_score` calculation.
      deprecated: false
      schema:
        type: number
      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.

        You can get information for multiple trained models in a single API
        request by using a comma-separated list of model IDs or a wildcard
        expression.
      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:

        - Contains wildcard expressions and there are no models that match.
        - Contains the _all string or no identifiers and there are no matches.
        - Contains wildcard expressions and there are only partial matches.

        If true, it returns an empty array when there are no matches and the
        subset of results when there are partial matches.
      deprecated: false
      schema:
        type: boolean
      style: form
    ml.get_trained_models-decompress_definition:
      in: query
      name: decompress_definition
      description: |-
        Specifies whether the included model definition should be returned as a
        JSON map (true) or in a custom compressed format (false).
      deprecated: false
      schema:
        type: boolean
      style: form
    ml.get_trained_models-exclude_generated:
      in: query
      name: exclude_generated
      description: |-
        Indicates if certain fields should be removed from the configuration on
        retrieval. This allows the configuration to be in an acceptable format to
        be retrieved and then added to another cluster.
      deprecated: false
      schema:
        type: boolean
      style: form
    ml.get_trained_models-from:
      in: query
      name: from
      description: Skips the specified number of models.
      deprecated: false
      schema:
        type: number
      style: form
    ml.get_trained_models-include:
      in: query
      name: include
      description: |+
        A comma delimited string of optional fields to include in the response
        body.

        Supported values include:
          - `definition`: Includes the model definition.
          - `feature_importance_baseline`: Includes the baseline for feature importance values.
          - `hyperparameters`: Includes the information about hyperparameters used to train the model.
        This information consists of the value, the absolute and relative
        importance of the hyperparameter as well as an indicator of whether it was
        specified by the user or tuned during hyperparameter optimization.
          - `total_feature_importance`: Includes the total feature importance for the training data set. The
        baseline and total feature importance values are returned in the metadata
        field in the response body.
          - `definition_status`: Includes the model definition status.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/ml._types.Include"
      style: form
    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
    ml.get_trained_models-tags:
      in: query
      name: tags
      description: |-
        A comma delimited string of tags. A trained model can have many tags, or
        none. When supplied, only trained models that contain all the supplied
        tags are returned.
      deprecated: false
      schema:
        oneOf:
        - type: string
        - type: array
          items:
            type: string
      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
        comma-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:

        - Contains wildcard expressions and there are no models that match.
        - Contains the _all string or no identifiers and there are no matches.
        - Contains wildcard expressions and there are only partial matches.

        If true, it returns an empty array when there are no matches and the
        subset of results when there are partial matches.
      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
        alphanumeric characters (a-z and 0-9), hyphens, and underscores. It must start and end with alphanumeric
        characters. NOTE: If you use this path parameter, you cannot provide datafeed or anomaly detection job
        configuration details in the request body.
      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
    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
    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.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.ExpandWildcards"
      style: form
    msearch-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
    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
    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
        the name of the matched query associated with its score (true)
        or as an array containing the name of the matched queries (false)
        This functionality reruns each named query on every hit in a search response.
        Typically, this adds a small overhead to a request.
        However, using computationally expensive named queries on a large number of hits may add significant overhead.
      deprecated: false
      schema:
        type: boolean
      style: form
    msearch-index_:
      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
    msearch-max_concurrent_searches:
      in: query
      name: max_concurrent_searches
      description: |-
        Maximum number of concurrent searches the multi search API can execute.
        Defaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.
      deprecated: false
      schema:
        type: number
      style: form
    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
    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
    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.

        Supported values include:
          - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.
          - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.

      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.
        It supports wildcards (`*`).
        To 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
      style: form
    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
    msearch_template-search_type:
      in: query
      name: search_type
      description: |+
        The type of the search operation.

        Supported values include:
          - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.
          - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.SearchType"
      style: form
    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.
        If `false`, it returns `hits.total` as an object.
      deprecated: false
      schema:
        type: boolean
      style: form
    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"
      style: form
    mtermvectors-fields:
      in: query
      name: fields
      description: |-
        A comma-separated list or wildcard expressions of fields to include in the statistics.
        It 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
    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
    mtermvectors-offsets:
      in: query
      name: offsets
      description: If `true`, the response includes term offsets.
      deprecated: false
      schema:
        type: boolean
      style: form
    mtermvectors-payloads:
      in: query
      name: payloads
      description: If `true`, the response includes term payloads.
      deprecated: false
      schema:
        type: boolean
      style: form
    mtermvectors-positions:
      in: query
      name: positions
      description: If `true`, the response includes term positions.
      deprecated: false
      schema:
        type: boolean
      style: form
    mtermvectors-preference:
      in: query
      name: preference
      description: |-
        The node or shard the operation should be performed on.
        It is random by default.
      deprecated: false
      schema:
        type: string
      style: form
    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
    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"
      style: form
    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.

        Supported values include:
          - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
          - `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.
          - `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.
        NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
        If used incorrectly, it can result in loss of data.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.VersionType"
      style: form
    put_script-id:
      in: path
      name: id
      description: |-
        The identifier for the stored script or search template.
        It 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.
        To 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.
        To prevent errors, the API immediately compiles the script or template in this context.
        If you specify both this and the `<context>` 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.
        If no response is received before the timeout expires, the request fails and returns an error.
        It 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.
        If no response is received before the timeout expires, the request fails and returns an error.
        It 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.
        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
    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.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      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

        Supported values include:
          - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.
          - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.SearchType"
      style: form
    render_search_template-id:
      in: path
      name: id
      description: |-
        The ID of the search template to render.
        If 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
    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
      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.
        It supports wildcards (`*`).
        To 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.
        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
    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.
        If `false`, it returns an error with no partial results.

        To 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-analyzer:
      in: query
      name: analyzer
      description: |-
        The analyzer to use for the query string.
        This parameter can be used only when the `q` query string parameter is specified.
      deprecated: false
      schema:
        type: string
      style: form
    search-analyze_wildcard:
      in: query
      name: analyze_wildcard
      description: |-
        If `true`, wildcard and prefix queries are analyzed.
        This parameter can be used only when the `q` query string parameter is specified.
      deprecated: false
      schema:
        type: boolean
      style: form
    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.
        If 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
    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`.
        This 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.
        This 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.
        If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
        It supports comma-separated values such as `open,hidden`.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      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
      style: form
    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
    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
    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.

        This functionality reruns each named query on every hit in a search response.
        Typically, this adds a small overhead to a request.
        However, using computationally expensive named queries on a large number of hits may add significant overhead.
      deprecated: false
      schema:
        type: boolean
      style: form
    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.
        This parameter can be used only when the `q` query string parameter is specified.
      deprecated: false
      schema:
        type: boolean
      style: form
    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.
        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
    search-preference:
      in: query
      name: preference
      description: |-
        The nodes and shards used for the search.
        By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness.
        Valid values are:

        * `_only_local` to run the search only on shards on the local node.
        * `_local` to, if possible, run the search on shards on the local node, or if not, select shards using the default method.
        * `_only_nodes:<node-id>,<node-id>` 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.
        * `_prefer_nodes:<node-id>,<node-id>` to if possible, run the search on the specified nodes IDs. If not, select shards using the default method.
        * `_shards:<shard>,<shard>` 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`.
        * `<custom-string>` (any string that does not start with `_`) to route searches with the same `<custom-string>` to the same shards in the same order.
      deprecated: false
      schema:
        type: string
      style: form
    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.
        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 (if date filters are mandatory to match but the shard bounds and the query are disjoint).
        When unspecified, the pre-filter phase is executed if any of these conditions is met:

        * The request targets more than 128 shards.
        * The request targets one or more read-only index.
        * The primary sort of the query targets an indexed field.
      deprecated: false
      schema:
        type: number
      style: form
    search-request_cache:
      in: query
      name: request_cache
      description: |-
        If `true`, the caching of search results is enabled for requests where `size` is `0`.
        It 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.
        By default, this value cannot exceed `1d` (24 hours).
        You 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.

        Supported values include:
          - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.
          - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.

      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:
          type: string
      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.
        If no fields are specified, no stored fields are included in the response.
        If this field is specified, the `_source` parameter defaults to `false`.
        You can pass `_source: true` to return both source fields and stored fields in the search response.
      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.
        This parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.

        Supported values include:
          - `missing`: Only generate suggestions for terms that are not in the shard.
          - `popular`: Only suggest terms that occur in more docs on the shard than the original term.
          - `always`: Suggest any matching suggestions based on terms in the suggest text.

      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.
        This 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.
        This parameter can be used only when the `suggest_field` and `suggest_text` query string parameters are specified.
      deprecated: false
      schema:
        type: string
      style: form
    search-terminate_after:
      in: query
      name: terminate_after
      description: |-
        The maximum number of documents to collect for each shard.
        If a query reaches this limit, Elasticsearch terminates the query early.
        Elasticsearch collects documents before sorting.

        IMPORTANT: Use with caution.
        Elasticsearch applies this parameter to each shard handling the request.
        When possible, let Elasticsearch perform early termination automatically.
        Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers.
        If 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.
        If no response is received before the timeout expires, the request fails and returns an error.
        It 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.
        If `true`, the exact number of hits is returned at the cost of some performance.
        If `false`, the response does not include the total number of hits matching the query.
      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
    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
    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
    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.
        These fields are returned in the `hits._source` property of the search response.
        Valid values are:

        * `true` to return the entire document source.
        * `false` to not return the document source.
        * `<string>` 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.
        You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter.
        If the `_source` parameter is `false`, this parameter is ignored.
      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.Fields"
      style: form
    search-_source_exclude_vectors:
      in: query
      name: _source_exclude_vectors
      description: Whether vectors should be excluded from _source
      deprecated: false
      schema:
        type: boolean
      x-state: Generally available
      style: form
    search-_source_includes:
      in: query
      name: _source_includes
      description: |-
        A comma-separated list of source fields to include in the response.
        If this parameter is specified, only these source fields are returned.
        You can exclude fields from this subset using the `_source_excludes` query parameter.
        If the `_source` parameter is `false`, this parameter is ignored.
      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
      style: form
    search-q:
      in: query
      name: q
      description: |-
        A query in the Lucene query string syntax.
        Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.

        IMPORTANT: This parameter overrides the query parameter in the request body.
        If both parameters are specified, documents matching the query request body parameter are not returned.
      deprecated: false
      schema:
        type: string
      style: form
    search-size:
      in: query
      name: size
      description: |-
        The number of hits to return.
        By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
        To page through more hits, use the `search_after` parameter.
      deprecated: false
      schema:
        type: number
      style: form
    search-from:
      in: query
      name: from
      description: |-
        The starting document offset, which must be non-negative.
        By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
        To page through more hits, use the `search_after` parameter.
      deprecated: false
      schema:
        type: number
      style: form
    search-sort:
      in: query
      name: sort
      description: A comma-separated list of `<field>:<direction>` pairs.
      deprecated: false
      schema:
        oneOf:
        - type: string
        - type: array
          items:
            type: string
      style: form
    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"
      style: simple
    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"
      style: simple
    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
      x-state: Generally available
      style: form
    search_mvt-index:
      in: path
      name: index
      description: |-
        A list of indices, data streams, or aliases to search.
        It supports wildcards (`*`).
        To search all data streams and indices, omit this parameter or use `*` or `_all`.
        To search a remote cluster, use the `<cluster>:<target>` syntax.
      required: true
      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.Indices"
      style: simple
    search_mvt-field:
      in: path
      name: field
      description: |-
        A field that contains the geospatial data to return.
        It must be a `geo_point` or `geo_shape` field.
        The field must have doc values enabled. It cannot be a nested field.

        NOTE: Vector tiles do not natively support geometry collections.
        For `geometrycollection` values in a `geo_shape` field, the API returns a hits layer feature for each element of the collection.
        This behavior may change in a future release.
      required: true
      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.Field"
      style: simple
    search_mvt-zoom:
      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
    search_mvt-x:
      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
    search_mvt-y:
      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
    search_mvt-exact_bounds:
      in: query
      name: exact_bounds
      description: |-
        If `false`, the meta layer's feature is the bounding box of the tile.
        If true, the meta layer's feature is a bounding box resulting from a
        geo_bounds aggregation. The aggregation runs on <field> values that intersect
        the <zoom>/<x>/<y> tile with wrap_longitude set to false. The resulting
        bounding box may be larger than the vector tile.
      deprecated: false
      schema:
        type: boolean
      style: form
    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
      style: form
    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"
      style: form
    search_mvt-grid_precision:
      in: query
      name: grid_precision
      description: |-
        Additional zoom levels available through the aggs layer. For example, if <zoom> is 7
        and grid_precision is 8, you can zoom in up to level 15. Accepts 0-8. If 0, results
        don't include the aggs layer.
      deprecated: false
      schema:
        type: number
      style: form
    search_mvt-grid_type:
      in: query
      name: grid_type
      description: |-
        Determines the geometry type for features in the aggs layer. In the aggs layer,
        each feature represents a geotile_grid cell. If 'grid' each feature is a Polygon
        of the cells bounding box. If 'point' each feature is a Point that is the centroid
        of the cell.
      deprecated: false
      schema:
        "$ref": "#/components/schemas/_global.search_mvt._types.GridType"
      style: form
    search_mvt-size:
      in: query
      name: size
      description: |-
        Maximum number of features to return in the hits layer. Accepts 0-10000.
        If 0, results don't include the hits layer.
      deprecated: false
      schema:
        type: number
      style: form
    search_mvt-track_total_hits:
      in: query
      name: track_total_hits
      description: |-
        The number of hits matching the query to count accurately.
        If `true`, the exact number of hits is returned at the cost of some performance.
        If `false`, the response does not include the total number of hits matching the query.
      deprecated: false
      schema:
        "$ref": "#/components/schemas/_global.search._types.TrackHits"
      style: form
    search_mvt-with_labels:
      in: query
      name: with_labels
      description: |-
        If `true`, the hits and aggs layers will contain additional point features representing
        suggested label positions for the original features.

        * `Point` and `MultiPoint` features will have one of the points selected.
        * `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.
        * `LineString` features will likewise provide a roughly central point selected from the triangle-tree.
        * The aggregation results will provide one central point for each aggregation bucket.

        All attributes from the original features will also be copied to the new label features.
        In addition, the new features will be distinguishable using the tag `_mvt_label_position`.
      deprecated: false
      schema:
        type: boolean
      style: form
    search_template-index:
      in: path
      name: index
      description: |-
        A comma-separated list of data streams, indices, and aliases to search.
        It 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.
        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
    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
      style: form
    search_template-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`.

        Supported values include:
          - `all`: Match any data stream or index, including hidden ones.
          - `open`: Match open, non-hidden indices. Also matches any non-hidden data stream.
          - `closed`: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
          - `hidden`: Match hidden data streams and hidden indices. Must be combined with `open`, `closed`, or `both`.
          - `none`: Wildcard expressions are not accepted.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.ExpandWildcards"
      style: form
    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
      style: form
    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
      style: form
    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
      style: form
    search_template-preference:
      in: query
      name: preference
      description: |-
        The node or shard the operation should be performed on.
        It is random by default.
      deprecated: false
      schema:
        type: string
      style: form
    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
        should 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.

        Supported values include:
          - `query_then_fetch`: Documents are scored using local term and document frequencies for the shard. This is usually faster but less accurate.
          - `dfs_query_then_fetch`: Documents are scored using global term and document frequencies across all shards. This is usually slower but more accurate.

      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.
        If `false`, it is rendered as an object.
      deprecated: false
      schema:
        type: boolean
      x-state: Generally available
      style: form
    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
    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.get_role-name:
      in: path
      name: name
      description: |-
        The name of the role.
        You can specify multiple roles as a comma-separated list.
        If 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.has_privileges-user:
      in: path
      name: user
      description: Username
      required: true
      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.Name"
      style: simple
    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.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.
        An API key's actual permission is the intersection of its assigned role descriptors and the owner user's role descriptors (effectively limited by it).
        An 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
      style: form
    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.
        If 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
      style: form
    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
      x-state: Generally available
      style: form
    sql.query-format:
      in: query
      name: format
      description: |-
        The format for the response.
        You can also specify a format using the `Accept` HTTP header.
        If 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
    terms_enum-index:
      in: path
      name: index
      description: |-
        A comma-separated list of data streams, indices, and index aliases to search.
        Wildcard (`*`) expressions are supported.
        To 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
    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.
        It 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:

        * The document count (how many documents contain this field).
        * The sum of document frequencies (the sum of document frequencies for all terms in this field).
        * 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
    termvectors-offsets:
      in: query
      name: offsets
      description: If `true`, the response includes term offsets.
      deprecated: false
      schema:
        type: boolean
      style: form
    termvectors-payloads:
      in: query
      name: payloads
      description: If `true`, the response includes term payloads.
      deprecated: false
      schema:
        type: boolean
      style: form
    termvectors-positions:
      in: query
      name: positions
      description: If `true`, the response includes term positions.
      deprecated: false
      schema:
        type: boolean
      style: form
    termvectors-preference:
      in: query
      name: preference
      description: |-
        The node or shard the operation should be performed on.
        It is random by default.
      deprecated: false
      schema:
        type: string
      style: form
    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
      style: form
    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
    termvectors-term_statistics:
      in: query
      name: term_statistics
      description: |-
        If `true`, the response includes:

        * The total term frequency (how often a term occurs in all documents).
        * The document frequency (the number of documents containing the current term).

        By 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.

        Supported values include:
          - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
          - `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.
          - `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.
        NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
        If used incorrectly, it can result in loss of data.

      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.VersionType"
      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
        wildcard expression. You can get information for all transforms by using
        `_all`, by specifying `*` as the `<transform_id>`, or by omitting the
        `<transform_id>`.
      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:

        1. Contains wildcard expressions and there are no transforms that match.
        2. Contains the _all string or no identifiers and there are no matches.
        3. Contains wildcard expressions and there are only partial matches.

        If this parameter is false, the request returns a 404 status code when
        there are no matches or only partial matches.
      deprecated: false
      schema:
        type: boolean
      style: form
    transform.get_transform-from:
      in: query
      name: from
      description: Skips the specified number of transforms.
      deprecated: false
      schema:
        type: number
      style: form
    transform.get_transform-size:
      in: query
      name: size
      description: Specifies the maximum number of transforms to obtain.
      deprecated: false
      schema:
        type: number
      style: form
    transform.get_transform-exclude_generated:
      in: query
      name: exclude_generated
      description: |-
        Excludes fields that were automatically added when creating the
        transform. This allows the configuration to be in an acceptable format to
        be retrieved and then added to another cluster.
      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
        configuration 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
        timeout expires, the request fails and returns an error.
      deprecated: false
      schema:
        "$ref": "#/components/schemas/_types.Duration"
      style: form
  requestBodies:
    async_search.submit:
      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
                  hits using the from and size parameters. To page through more hits, use the
                  search_after parameter.
                default: 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
                  number of hits is returned at the cost of some performance. If false, the
                  response does not include the total number of hits matching the query.
                  Defaults 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
                  names 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
                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
                  not 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
                  than 10,000 hits using the from and size parameters. To page through more
                  hits, use the search_after parameter.
                default: 10
                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
                  fields 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
                  matching 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
                  limit, Elasticsearch terminates the query early. Elasticsearch collects documents
                  before sorting. Defaults to 0, which does not terminate query execution early.
                default: 0
                type: number
              timeout:
                description: |-
                  Specifies the period of time to wait for a response from each shard. If no response
                  is received before the timeout expires, the request fails and returns an error.
                  Defaults 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
                  of 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,
                  no stored fields are included in the response. If this field is specified, the _source
                  parameter defaults to false. You can pass _source: true to return both source fields
                  and stored fields in the search response.
                allOf:
                - "$ref": "#/components/schemas/_types.Fields"
              pit:
                description: |-
                  Limits the search to a point in time (PIT). If you provide a PIT, you
                  cannot specify an <index> 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
                  precedence 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
                  aggregation for its associated searches. You can retrieve these stats using
                  the 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.

                '
              value: |-
                {
                  "sort": [
                    { "date": { "order": "asc" } }
                  ],
                  "aggs": {
                    "sale_date": {
                      "date_histogram": {
                        "field": "date",
                        "calendar_interval": "1d"
                      }
                    }
                  }
                }
    bulk:
      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" } }
                { "field1" : "value1" }
                { "delete" : { "_index" : "test", "_id" : "2" } }
                { "create" : { "_index" : "test", "_id" : "3" } }
                { "field1" : "value3" }
                { "update" : {"_id" : "1", "_index" : "test"} }
                { "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.

                '
              value: |-
                { "update" : {"_id" : "1", "_index" : "index1", "retry_on_conflict" : 3} }
                { "doc" : {"field" : "value"} }
                { "update" : { "_id" : "0", "_index" : "index1", "retry_on_conflict" : 3} }
                { "script" : { "source": "ctx._source.counter += params.param1", "lang" : "painless", "params" : {"param1" : 1}}, "upsert" : {"counter" : 1}}
                { "update" : {"_id" : "2", "_index" : "index1", "retry_on_conflict" : 3} }
                { "doc" : {"field" : "value"}, "doc_as_upsert" : true }
                { "update" : {"_id" : "3", "_index" : "index1", "_source" : true} }
                { "doc" : {"field" : "value"} }
                { "update" : {"_id" : "4", "_index" : "index1"} }
                { "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`.

                '
              value: |-
                { "update": {"_id": "5", "_index": "index1"} }
                { "doc": {"my_field": "foo"} }
                { "update": {"_id": "6", "_index": "index1"} }
                { "doc": {"my_field": "foo"} }
                { "create": {"_id": "7", "_index": "index1"} }
                { "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.

                '
              value: |-
                { "index" : { "_index" : "my_index", "_id" : "1", "dynamic_templates": {"work_location": "geo_point"}} }
                { "field" : "value1", "work_location": "41.12,-71.34", "raw_location": "41.12,-71.34"}
                { "create" : { "_index" : "my_index", "_id" : "2", "dynamic_templates": {"home_location": "geo_point"}} }
                { "field" : "value2", "home_location": "41.12,-71.34"}
      required: true
    cat.count:
      content:
        application/json:
          schema:
            type: object
    clear_scroll:
      content:
        application/json:
          schema:
            type: object
            properties:
              scroll_id:
                description: |-
                  The scroll IDs to clear.
                  To clear all scroll IDs, use `_all`.
                allOf:
                - "$ref": "#/components/schemas/_types.ScrollIds"
          examples:
            ClearScrollRequestExample1:
              description: Run `DELETE /_search/scroll` to clear the search context
                and results for a scrolling search.
              value: |-
                {
                  "scroll_id": "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
                }
    cluster.put_component_template:
      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.
                  This number isn't automatically generated or incremented by Elasticsearch.
                  To 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.
                  It may have any contents. This map is not automatically generated by Elasticsearch.
                  This information is stored in the cluster state, so keeping it short is preferable.
                  To 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
                  that uses deprecated components, Elasticsearch will emit a deprecation warning.
                type: boolean
            required:
            - template
          examples:
            ClusterPutComponentTemplateRequestExample1:
              summary: Create a template
              value: |-
                {
                  "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"
                        }
                      }
                    }
                  }
                }
            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.

                '
              value: |-
                {
                  "template": {
                    "settings": {
                      "number_of_shards": 1
                    },
                    "aliases": {
                      "alias1": {},
                      "alias2": {
                        "filter": {
                          "term": {
                            "user.id": "kimchy"
                          }
                        },
                        "routing": "shard-1"
                      },
                      "{index}-alias": {}
                    }
                  }
                }
      required: true
    connector.put:
      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: |-
                {
                  "index_name": "search-google-drive",
                  "name": "My Connector",
                  "service_type": "google_drive"
                }
            ConnectorPutRequestExample2:
              value: |-
                {
                  "index_name": "search-google-drive",
                  "name": "My Connector",
                  "description": "My Connector to sync data to Elastic index from Google Drive",
                  "service_type": "google_drive",
                  "language": "english"
                }
    count:
      content:
        application/json:
          schema:
            type: object
            properties:
              query:
                description: |-
                  Defines the search query using Query DSL. A request body query cannot be used
                  with 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`.

                '
              value: |-
                {
                  "query" : {
                    "term" : { "user.id" : "kimchy" }
                  }
                }
    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.

                '
              value: |-
                {
                  "@timestamp": "2099-11-15T13:12:00",
                  "message": "GET /search HTTP/1.1 200 1070000",
                  "user": {
                    "id": "kimchy"
                  }
                }
      required: true
    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:
                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
                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.
                  If true, the query will keep running and will return results based on the available shards.
                  For 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.
                  If true, the sequence query will return results based on the available shards, ignoring the others.
                  If 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:
                description: |2+


                  Supported values include:
                    - `tail`: Return the most recent matches, similar to the Unix tail command.
                    - `head`: Return the earliest matches, similar to the Unix head command.

                default: tail
                allOf:
                - "$ref": "#/components/schemas/eql.search.ResultPosition"
              runtime_mappings:
                x-state: Generally available
                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`
                  parameter to get a smaller or larger set of samples. To retrieve more than one sample per set of join keys, use the
                  `max_samples_per_key` parameter. Pipes are not supported for sample queries.
                default: 1
                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`.

                '
              value: |-
                {
                  "query": """
                    process where (process.name == "cmd.exe" and process.pid != 2013)
                  """
                }
            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.

                '
              value: |-
                {
                  "query": """
                    sequence by process.pid
                      [ file where file.name == "cmd.exe" and process.pid != 2013 ]
                      [ process where stringContains(process.executable, "regsvr32") ]
                  """
                }
      required: true
    explain:
      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`

                '
              value: |-
                {
                  "query" : {
                    "match" : { "message" : "elasticsearch" }
                  }
                }
    field_caps:
      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
                allOf:
                - "$ref": "#/components/schemas/_types.Fields"
              index_filter:
                description: |-
                  Filter indices if the provided query rewrites to `match_none` on every shard.

                  IMPORTANT: 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.
                  For 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.
                  However, 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.
                  These 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
                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.

                '
              value: |-
                {
                  "index_filter": {
                    "range": {
                      "@timestamp": {
                        "gte": "2018"
                      }
                    }
                  }
                }
    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 /<target>/_doc/` request format, the `op_type`
                is automatically set to `create` and the index operation generates
                a unique ID for the document.

                '
              value: |-
                {
                  "@timestamp": "2099-11-15T13:12:00",
                  "message": "GET /search HTTP/1.1 200 1070000",
                  "user": {
                    "id": "kimchy"
                  }
                }
            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.

                '
              value: |-
                {
                  "@timestamp": "2099-11-15T13:12:00",
                  "message": "GET /search HTTP/1.1 200 1070000",
                  "user": {
                    "id": "kimchy"
                  }
                }
      required: true
    indices.analyze:
      content:
        application/json:
          schema:
            type: object
            properties:
              analyzer:
                description: |-
                  The name of the analyzer that should be applied to the provided `text`.
                  This 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.
                  To use this parameter, you must specify an index.
                  If 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.
                  If 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: |-
                {
                  "analyzer": "standard",
                  "text": "this is a test"
                }
            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: |-
                {
                  "analyzer": "standard",
                  "text": [
                    "this is a test",
                    "the second text"
                  ]
                }
            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: |-
                {
                  "tokenizer": "keyword",
                  "filter": [
                    "lowercase"
                  ],
                  "char_filter": [
                    "html_strip"
                  ],
                  "text": "this is a <b>test</b>"
                }
            indicesAnalyzeRequestExample4:
              summary: Custom analyzer example 2
              description: Custom tokenizers, token filters, and character filters
                can be specified in the request body.
              value: |-
                {
                  "tokenizer": "whitespace",
                  "filter": [
                    "lowercase",
                    {
                      "type": "stop",
                      "stopwords": [
                        "a",
                        "is",
                        "this"
                      ]
                    }
                  ],
                  "text": "this is a test"
                }
            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: |-
                {
                  "field": "obj1.field1",
                  "text": "this is a test"
                }
            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: |-
                {
                  "normalizer": "my_normalizer",
                  "text": "BaR"
                }
            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.

                '
              value: |-
                {
                  "tokenizer": "standard",
                  "filter": [
                    "snowball"
                  ],
                  "text": "detailed output",
                  "explain": true,
                  "attributes": [
                    "keyword"
                  ]
                }
      required: true
    indices.create_from:
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/indices.create_from.CreateFrom"
    indices.put_alias:
      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.
                  If specified, this overwrites the `routing` value for indexing operations.
                  Data 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.
                  If an alias points to multiple indices or data streams and `is_write_index` isn’t set, the alias rejects write requests.
                  If an index alias points to one index and `is_write_index` isn’t set, the index automatically acts as the write index.
                  Data 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.
                  Data 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.
                  If specified, this overwrites the `routing` value for search operations.
                  Data 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: |-
                {
                  "filter": {
                    "bool": {
                      "filter": [
                        {
                          "range": {
                            "@timestamp": {
                              "gte": "now-1d/d",
                              "lt": "now/d"
                            }
                          }
                        },
                        {
                          "term": {
                            "user.id": "kimchy"
                          }
                        }
                      ]
                    }
                  }
                }
            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: |-
                {
                  "is_write_index": true
                }
            indicesPutAliasRequestExample3:
              summary: Routing
              description: Use the routing option to route requests for an alias to
                a specific shard.
              value: |-
                {
                  "routing": "1"
                }
    indices.put_index_template:
      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.
                  Component 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.
                  It 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.
                  Supports an empty object.
                  Data 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.
                  The index template with the highest priority is chosen.
                  If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
                  This number is not automatically generated by Elasticsearch.
                type: number
              version:
                description: |-
                  Version number used to manage index templates externally.
                  This number is not automatically generated by Elasticsearch.
                  External systems can use these version numbers to simplify template management.
                  To unset a version, replace the template without specifying one.
                allOf:
                - "$ref": "#/components/schemas/_types.VersionNumber"
              _meta:
                description: |-
                  Optional user metadata about the index template.
                  It may have any contents.
                  It is not automatically generated or used by Elasticsearch.
                  This user-defined object is stored in the cluster state, so keeping it short is preferable
                  To 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.
                  If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
                  If set to `false`, then 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
                  references 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
                  that uses deprecated components, Elasticsearch will emit a deprecation warning.
                type: boolean
          examples:
            IndicesPutIndexTemplateRequestExample1:
              summary: Create a template
              value: |-
                {
                  "index_patterns" : ["template*"],
                  "priority" : 1,
                  "template": {
                    "settings" : {
                      "number_of_shards" : 2
                    }
                  }
                }
            IndicesPutIndexTemplateRequestExample2:
              summary: Create a 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.
              value: |-
                {
                  "index_patterns": [
                    "template*"
                  ],
                  "template": {
                    "settings": {
                      "number_of_shards": 1
                    },
                    "aliases": {
                      "alias1": {},
                      "alias2": {
                        "filter": {
                          "term": {
                            "user.id": "kimchy"
                          }
                        },
                        "routing": "shard-1"
                      },
                      "{index}-alias": {}
                    }
                  }
                }
      required: true
    indices.put_mapping:
      content:
        application/json:
          schema:
            type: object
            properties:
              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/_types.mapping.DynamicMapping"
              dynamic_date_formats:
                description: |-
                  If date detection is enabled then new string fields are checked
                  against 'dynamic_date_formats' and if the value matches then
                  a new date field is added instead of string.
                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:
                - "$ref": "#/components/schemas/_types.mapping.FieldNamesField"
              _meta:
                description: |-
                  A mapping type can have custom meta data associated with it. These are
                  not used at all by Elasticsearch, but can be used to store
                  application-specific metadata.
                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:

                  - Field name
                  - Field data type
                  - 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"
          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.

                '
              value: |-
                {
                  "properties": {
                    "user": {
                      "properties": {
                        "name": {
                          "type": "keyword"
                        }
                      }
                    }
                  }
                }
      required: true
    indices.put_settings:
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/indices._types.IndexSettings"
          examples:
            IndicesPutSettingsRequestExample1:
              summary: Change a dynamic index setting
              value: |-
                {
                  "index" : {
                    "number_of_replicas" : 2
                  }
                }
            indicesPutSettingsRequestExample2:
              summary: Reset an index setting
              description: To revert a setting to the default value, use `null`.
              value: |-
                {
                  "index" : {
                    "refresh_interval" : null
                  }
                }
            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: |-
                {
                  "analysis": {
                    "analyzer": {
                      "content": {
                        "type": "custom",
                        "tokenizer": "whitespace"
                      }
                    }
                  }
                }
      required: true
    indices.resolve_index:
      content:
        application/json:
          schema:
            type: object
    indices.rollover:
      content:
        application/json:
          schema:
            type: object
            properties:
              aliases:
                description: |-
                  Aliases for the target index.
                  Data streams do not support this parameter.
                type: object
                additionalProperties:
                  "$ref": "#/components/schemas/indices._types.Alias"
              conditions:
                description: |-
                  Conditions for the rollover.
                  If specified, Elasticsearch only performs the rollover if the current index satisfies these conditions.
                  If this parameter is not specified, Elasticsearch performs the rollover unconditionally.
                  If conditions are specified, at least one of them must be a `max_*` condition.
                  The 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.
                  If 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.
                  Data streams do not support this parameter.
                type: object
                additionalProperties:
                  type: object
          examples:
            indicesRolloverRequestExample1:
              summary: Stack request
              description: Create a new index for a data stream
              value: |-
                {
                  "conditions": {
                    "max_age": "7d",
                    "max_docs": 1000,
                    "max_primary_shard_size": "50gb",
                    "max_primary_shard_docs": "2000"
                  }
                }
            indicesRolloverRequestExample2:
              summary: Serverless request
              description: Create a new index for a data stream
              value: "{}"
    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.
                  If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.
                  If set to `false`, then 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.
                  Component 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.
                  It 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.
                  Supports an empty object.
                  Data 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.
                  The index template with the highest priority is chosen.
                  If no priority is specified the template is treated as though it is of priority 0 (lowest priority).
                  This number is not automatically generated by Elasticsearch.
                type: number
              version:
                description: |-
                  Version number used to manage index templates externally.
                  This number is not automatically generated by Elasticsearch.
                allOf:
                - "$ref": "#/components/schemas/_types.VersionNumber"
              _meta:
                description: |-
                  Optional user metadata about the index template.
                  May have any contents.
                  This 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
                  references 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
                  that 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.

                '
              value: |-
                {
                  "index_patterns": ["my-index-*"],
                  "composed_of": ["ct2"],
                  "priority": 10,
                  "template": {
                    "settings": {
                      "index.number_of_replicas": 1
                    }
                  }
                }
    indices.validate_query:
      content:
        application/json:
          schema:
            type: object
            properties:
              query:
                description: Query in the Lucene query string syntax.
                allOf:
                - "$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.
                  It is not required for other tasks.
                type: string
              input:
                description: |-
                  The text on which you want to perform the inference task.
                  It can be a single string or an array.

                  > info
                  > 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:
                  * `SEARCH`
                  * `INGEST`
                  * `CLASSIFICATION`
                  * `CLUSTERING`
                  Not all services support all values. Unsupported values will trigger a validation exception.
                  Accepted values depend on the configured inference service, refer to the relevant service-specific documentation for more info.

                  > info
                  > 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 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
    inference.put:
      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: |-
                {
                 "service": "cohere",
                 "service_settings": {
                   "model_id": "rerank-english-v3.0",
                   "api_key": "{{COHERE_API_KEY}}"
                 }
                }
      required: true
    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"
              pipeline:
                description: |-
                  The pipeline to test.
                  If you don't specify the `pipeline` request path parameter, this parameter is required.
                  If 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: |-
                {
                  "pipeline" :
                  {
                    "description": "_description",
                    "processors": [
                      {
                        "set" : {
                          "field" : "field2",
                          "value" : "_value"
                        }
                      }
                    ]
                  },
                  "docs": [
                    {
                      "_index": "index",
                      "_id": "id",
                      "_source": {
                        "foo": "bar"
                      }
                    },
                    {
                      "_index": "index",
                      "_id": "id",
                      "_source": {
                        "foo": "rab"
                      }
                    }
                  ]
                }
      required: true
    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:
                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.

                '
              value: |-
                {
                  "docs": [
                    {
                      "_id": "1"
                    },
                    {
                      "_id": "2"
                    }
                  ]
                }
            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.

                '
              value: |-
                {
                  "docs": [
                    {
                      "_index": "test",
                      "_id": "1",
                      "_source": false
                    },
                    {
                      "_index": "test",
                      "_id": "2",
                      "_source": [ "field3", "field4" ]
                    },
                    {
                      "_index": "test",
                      "_id": "3",
                      "_source": {
                        "include": [ "user" ],
                        "exclude": [ "user.location" ]
                      }
                    }
                  ]
                }
            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.

                '
              value: |-
                {
                  "docs": [
                    {
                      "_index": "test",
                      "_id": "1",
                      "stored_fields": [ "field1", "field2" ]
                    },
                    {
                      "_index": "test",
                      "_id": "2",
                      "stored_fields": [ "field3", "field4" ]
                    }
                  ]
                }
            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`.

                '
              value: |-
                {
                  "docs": [
                    {
                      "_index": "test",
                      "_id": "1",
                      "routing": "key2"
                    },
                    {
                      "_index": "test",
                      "_id": "2"
                    }
                  ]
                }
      required: true
    ml.get_calendars:
      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"
    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.
                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
                type: number
          examples:
            MlGetOverallBucketsExample1:
              description: An example body for a `GET _ml/anomaly_detectors/job-*/results/overall_buckets`
                request.
              value: |-
                {
                  "overall_score": 80,
                  "start": "1403532000000"
                }
    ml.preview_data_frame_analytics:
      content:
        application/json:
          schema:
            type: object
            properties:
              config:
                description: |-
                  A data frame analytics config as described in create data frame analytics
                  jobs. Note that `id` and `dest` don’t need to be provided in the context of
                  this API.
                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: |-
                {
                  "config": {
                    "source": {
                      "index": "houses_sold_last_10_yrs"
                    },
                    "analysis": {
                      "regression": {
                        "dependent_variable": "price"
                      }
                    }
                  }
                }
    ml.preview_datafeed:
      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
                  `datafeed_config` object does not include a `job_id` that references an existing anomaly detection job, you must
                  supply this `job_config` object. If you include both a `job_id` and a `job_config`, the latter information is
                  used. You cannot specify a `job_config` object unless you also supply a `datafeed_config` object.
                allOf:
                - "$ref": "#/components/schemas/ml._types.JobConfig"
    msearch:
      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: |-
                { }
                {"query" : {"match" : { "message": "this is a test"}}}
                {"index": "my-index-000002"}
                {"query" : {"match_all" : {}}}
      required: true
    msearch_template:
      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: |-
                { }
                { "id": "my-search-template", "params": { "query_string": "hello world", "from": 0, "size": 10 }}
                { }
                { "id": "my-other-search-template", "params": { "query_type": "match_all" }}
      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"
          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.

                '
              value: |-
                {
                  "docs": [
                      {
                        "_id": "2",
                        "fields": [
                            "message"
                        ],
                        "term_statistics": true
                      },
                      {
                        "_id": "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.

                '
              value: |-
                {
                  "ids": [ "1", "2" ],
                  "fields": [
                    "message"
                  ],
                  "term_statistics": true
                }
            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`.

                '
              value: |-
                {
                  "docs": [
                      {
                        "_index": "my-index-000001",
                        "doc" : {
                            "message" : "test test test"
                        }
                      },
                      {
                        "_index": "my-index-000001",
                        "doc" : {
                          "message" : "Another test ..."
                        }
                      }
                  ]
                }
    project.tags:
      content:
        application/json:
          schema:
            type: object
            properties:
              project_routing:
                description: A Lucene query using project metadata tags used to filter
                  which projects are returned in the response, such as _alias:_origin
                  or _alias:*pr*.
                type: string
    put_script:
      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.

                '
              value: |-
                {
                  "script": {
                    "lang": "mustache",
                    "source": {
                      "query": {
                        "match": {
                          "message": "{{query_string}}"
                        }
                      },
                      "from": "{{from}}",
                      "size": "{{size}}"
                    }
                  }
                }
            PutScriptRequestExample2:
              summary: Create a stored script
              description: 'Run `PUT _scripts/my-stored-script` to create a stored
                script.

                '
              value: |-
                {
                  "script": {
                    "lang": "painless",
                    "source": "Math.log(_score * 2) + params['my_modifier']"
                  }
                }
      required: true
    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:
                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: |-
                {
                  "requests": [
                    {
                      "id": "JFK query",
                      "request": { "query": { "match_all": {} } },
                      "ratings": []
                    } ],
                  "metric": {
                    "precision": {
                      "k": 20,
                      "relevant_rating_threshold": 1,
                      "ignore_unlabeled": false
                    }
                  }
                }
      required: true
    render_search_template:
      content:
        application/json:
          schema:
            type: object
            properties:
              id:
                description: |-
                  The ID of the search template to render.
                  If no `source` is specified, this or the `<template-id>` request path parameter is required.
                  If you specify both this parameter and the `<template-id>` parameter, the API uses only `<template-id>`.
                allOf:
                - "$ref": "#/components/schemas/_types.Id"
              file:
                type: string
              params:
                description: |-
                  Key-value pairs used to replace Mustache variables in the template.
                  The key is the variable name.
                  The value is the variable value.
                type: object
                additionalProperties:
                  type: object
              source:
                description: |-
                  An inline search template.
                  It supports the same parameters as the search API's request body.
                  These parameters also support Mustache variables.
                  If no `id` or `<templated-id>` is specified, this parameter is required.
                allOf:
                - "$ref": "#/components/schemas/_types.ScriptSource"
          examples:
            RenderSearchTemplateRequestExample1:
              description: Run `POST _render/template`
              value: |-
                {
                  "id": "my-search-template",
                  "params": {
                    "query_string": "hello world",
                    "from": 20,
                    "size": 10
                  }
                }
      required: true
    scripts_painless_execute:
      content:
        application/json:
          schema:
            type: object
            properties:
              context:
                description: |+
                  The context that the script should run in.
                  NOTE: Result ordering in the field contexts is not guaranteed.

                  Supported values include:
                    - `painless_test`: The default context if no other context is specified.
                    - `filter`: Treats scripts as if they were run inside a script query.
                    - `score`: Treats scripts as if they were run inside a `script_score` function in a `function_score` query.
                    - `boolean_field`: The context for boolean fields. The script returns a `true` or `false` response.
                    - `date_field`: The context for date fields. `emit` takes a long value and the script returns a sorted list of dates.
                    - `double_field`: The context for double numeric fields. The script returns a sorted list of double values.
                    - `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.
                    - `ip_field`: The context for `ip` fields. The script returns a sorted list of IP addresses.
                    - `keyword_field`: The context for keyword fields. The script returns a sorted list of string values.
                    - `long_field`: The context for long numeric fields. The script returns a sorted list of long values.
                    - `composite_field`: The context for composite runtime fields. The script returns a map of values.

                default: painless_test
                allOf:
                - "$ref": "#/components/schemas/_global.scripts_painless_execute.PainlessContext"
              context_setup:
                description: |-
                  Additional parameters for the `context`.
                  NOTE: 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.

                '
              value: |-
                {
                  "script": {
                    "source": "params.count / params.total",
                    "params": {
                      "count": 100.0,
                      "total": 1000.0
                    }
                  }
                }
            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.

                '
              value: |-
                {
                  "script": {
                    "source": "doc['field'].value.length() <= params.max_length",
                    "params": {
                      "max_length": 4
                    }
                  },
                  "context": "filter",
                  "context_setup": {
                    "index": "my-index-000001",
                    "document": {
                      "field": "four"
                    }
                  }
                }
            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.

                '
              value: |-
                {
                  "script": {
                    "source": "doc['rank'].value / params.max_rank",
                    "params": {
                      "max_rank": 5.0
                    }
                  },
                  "context": "score",
                  "context_setup": {
                    "index": "my-index-000001",
                    "document": {
                      "rank": 4
                    }
                  }
                }
      required: true
    scroll:
      content:
        application/json:
          schema:
            type: object
            properties:
              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:
            - scroll_id
          examples:
            ScrollRequestExample1:
              description: Run `GET /_search/scroll` to get the next batch of results
                for a scrolling search.
              value: |-
                {
                  "scroll_id" : "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
                }
    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:
                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.
                  By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
                  To page through more hits, use the `search_after` parameter.
                default: 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.
                  If `true`, the exact number of hits is returned at the cost of some performance.
                  If `false`, the  response does not include the total number of hits matching the query.
                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.
                  The boost value is the factor by which scores are multiplied.
                  A boost value greater than `1.0` increases the score.
                  A 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.
                  The 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
                oneOf:
                - "$ref": "#/components/schemas/_types.KnnSearch"
                - type: array
                  items:
                    "$ref": "#/components/schemas/_types.KnnSearch"
              min_score:
                description: |-
                  The minimum `_score` for matching documents.
                  Documents 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.
                  The search hits are filtered after the aggregations are calculated.
                  A 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.
                  NOTE: 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.
                  A retriever replaces other elements of the search API that also return top documents such as `query` and `knn`.
                x-state: Generally available
                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.
                  By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
                  To page through more hits, use the `search_after` property.
                default: 10
                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 <field>:<direction> 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.
                  These fields are returned in the `hits._source` property of the search response.
                  If the `stored_fields` property is specified, the `_source` property defaults to `false`.
                  Otherwise, it defaults to `true`.
                allOf:
                - "$ref": "#/components/schemas/_global.search._types.SourceConfig"
              fields:
                description: |-
                  An array of wildcard (`*`) field patterns.
                  The 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.
                  If a query reaches this limit, Elasticsearch terminates the query early.
                  Elasticsearch collects documents before sorting.

                  IMPORTANT: Use with caution.
                  Elasticsearch applies this property to each shard handling the request.
                  When possible, let Elasticsearch perform early termination automatically.
                  Avoid specifying this property for requests that target data streams with backing indices across multiple data tiers.

                  If set to `0` (default), the query does not terminate early.
                default: 0
                type: number
              timeout:
                description: |-
                  The period of time to wait for a response from each shard.
                  If no response is received before the timeout expires, the request fails and returns an error.
                  Defaults 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.
                  If no fields are specified, no stored fields are included in the response.
                  If this field is specified, the `_source` property defaults to `false`.
                  You 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).
                  If you provide a PIT, you cannot specify an `<index>` 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.
                  These 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.
                  Each group maintains a statistics aggregation for its associated searches.
                  You 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.

                '
              value: |-
                {
                  "query": {
                    "term": {
                      "user.id": "kimchy"
                    }
                  }
                }
            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.

                '
              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.

                '
              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}"
    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: |-
                {
                  "params": {
                    "query_string": "my first query",
                    "text_fields": [
                      {"name": "title", "boost": 5},
                      {"name": "description", "boost": 1}
                    ]
                  }
                }
    search_mvt:
      content:
        application/json:
          schema:
            type: object
            properties:
              aggs:
                description: |-
                  Sub-aggregations for the geotile_grid.

                  It supports the following aggregation types:

                  - `avg`
                  - `boxplot`
                  - `cardinality`
                  - `extended stats`
                  - `max`
                  - `median absolute deviation`
                  - `min`
                  - `percentile`
                  - `percentile-rank`
                  - `stats`
                  - `sum`
                  - `value count`

                  The 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
                  to avoid outline artifacts from geometries that extend past the extent of the tile.
                default: 5
                type: number
              exact_bounds:
                description: |-
                  If `false`, the meta layer's feature is the bounding box of the tile.
                  If `true`, the meta layer's feature is a bounding box resulting from a
                  `geo_bounds` aggregation. The aggregation runs on <field> values that intersect
                  the `<zoom>/<x>/<y>` tile with `wrap_longitude` set to `false`. The resulting
                  bounding 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
                type: number
              fields:
                description: |-
                  The fields to return in the `hits` layer.
                  It supports wildcards (`*`).
                  This parameter does not support fields with array values. Fields with array
                  values 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 `<zoom>` is `7`
                  and `grid_precision` is `8`, you can zoom in up to level 15. Accepts 0-8. If 0, results
                  don't include the aggs layer.
                default: 8
                type: number
              grid_type:
                description: |-
                  Determines the geometry type for features in the aggs layer. In the aggs layer,
                  each feature represents a `geotile_grid` cell. If `grid, each feature is a polygon
                  of the cells bounding box. If `point`, each feature is a Point that is the centroid
                  of the cell.
                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
                  precedence 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.
                  If 0, results don't include the hits layer.
                default: 10000
                type: number
              sort:
                description: |-
                  Sort the features in the hits layer. By default, the API calculates a bounding
                  box for each feature. It sorts features based on this box's diagonal length,
                  from longest to shortest.
                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
                  of hits is returned at the cost of some performance. If `false`, the response does
                  not include the total number of hits matching the query.
                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
                  suggested label positions for the original features.

                  * `Point` and `MultiPoint` features will have one of the points selected.
                  * `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.
                  * `LineString` features will likewise provide a roughly central point selected from the triangle-tree.
                  * The aggregation results will provide one central point for each aggregation bucket.

                  All attributes from the original features will also be copied to the new label features.
                  In 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.

                '
              value: |-
                {
                  "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"
                      }
                    }
                  }
                }
    search_template:
      content:
        application/json:
          schema:
            type: object
            properties:
              explain:
                description: |-
                  If `true`, returns detailed information about score calculation as part of each hit.
                  If 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,
                  this parameter is required.
                allOf:
                - "$ref": "#/components/schemas/_types.Id"
              params:
                description: |-
                  Key-value pairs used to replace Mustache variables in the template.
                  The key is the variable name.
                  The 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
                  request body. It also supports Mustache variables. If no `id` is specified, this
                  parameter 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.

                '
              value: |-
                {
                  "id": "my-search-template",
                  "params": {
                    "query_string": "hello world",
                    "from": 0,
                    "size": 10
                  }
                }
      required: true
    security.create_api_key:
      content:
        application/json:
          schema:
            type: object
            properties:
              expiration:
                description: |-
                  The expiration time for the API key.
                  By 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.
                  When 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.
                  If 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.
                  The structure of role descriptor is the same as the request for the create role API.
                  For more details, refer to the create or update roles API.

                  NOTE: 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.
                  In this case, you must explicitly specify a role descriptor with no privileges.
                  The 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
                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.

                '
              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
    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"
          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: |-
                {
                  "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" ]
                    }
                  ]
                }
      required: true
    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"
              indices:
                description: A list of indices permissions entries.
                type: array
                items:
                  "$ref": "#/components/schemas/security._types.IndicesPrivileges"
              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: |-
                {
                  "description": "Grants full access to all management features within the cluster.",
                  "cluster": ["all"],
                  "indices": [
                    {
                      "names": [ "index1", "index2" ],
                      "privileges": ["all"],
                      "field_security" : { // optional
                        "grant" : [ "title", "body" ]
                      },
                      "query": "{\"match\": {\"title\": \"foo\"}}" // optional
                    }
                  ],
                  "applications": [
                    {
                      "application": "myapp",
                      "privileges": [ "admin", "read" ],
                      "resources": [ "*" ]
                    }
                  ],
                  "run_as": [ "other_user" ], // optional
                  "metadata" : { // optional
                    "version" : 1
                  }
                }
            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: |-
                {
                  "cluster": ["cluster:monitor/main"],
                  "indices": [
                    {
                      "names": ["test"],
                      "privileges": ["read", "indices:admin/get"]
                    }
                  ]
                }
            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
    security.query_api_keys:
      content:
        application/json:
          schema:
            type: object
            properties:
              aggregations:
                description: |-
                  Any aggregations to run over the corpus of returned API keys.
                  Aggregations and queries work together. Aggregations are computed only on the API keys that match the query.
                  This supports only a subset of aggregation types, namely: `terms`, `range`, `date_range`, `missing`,
                  `cardinality`, `value_count`, `composite`, `filter`, and `filters`.
                  Additionally, 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.
                  If the query parameter is missing, it is equivalent to a `match_all` query.
                  The query supports a subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,
                  `ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.
                  You can query the following public information associated with an API key: `id`, `type`, `name`,
                  `creation`, `expiration`, `invalidated`, `invalidation`, `username`, `realm`, and `metadata`.

                  NOTE: The queryable string values associated with API keys are internally mapped as keywords.
                  Consequently, if no `analyzer` parameter is specified for a `match` query, then the provided match query string is interpreted as a single keyword value.
                  Such 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.
                  It must not be negative.
                  By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
                  To page through more hits, use the `search_after` parameter.
                default: 0
                type: number
              sort:
                externalDocs:
                  url: https://www.elastic.co/docs/reference/elasticsearch/rest-apis/sort-search-results
                description: |-
                  The sort definition.
                  Other than `id`, all public fields of an API key are eligible for sorting.
                  In 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.
                  It must not be negative.
                  The `size` parameter can be set to `0`, in which case no API key matches are returned, only the aggregation results.
                  By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
                  To page through more hits, use the `search_after` parameter.
                default: 10
                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: |-
                {
                  "query": {
                    "ids": {
                      "values": [
                        "VuaCfGcBCdbkQm-e5aOx"
                      ]
                    }
                  }
                }
            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.

                '
              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: |-
                {
                  "query": {
                    "term": {
                      "name": {
                        "value": "application-key-1"
                      }
                    }
                  }
                }
    security.query_role:
      content:
        application/json:
          schema:
            type: object
            properties:
              query:
                description: |-
                  A query to filter which roles to return.
                  If the query parameter is missing, it is equivalent to a `match_all` query.
                  The query supports a subset of query types, including `match_all`, `bool`, `term`, `terms`, `match`,
                  `ids`, `prefix`, `wildcard`, `exists`, `range`, and `simple_query_string`.
                  You can query the following information associated with roles: `name`, `description`, `metadata`,
                  `applications.application`, `applications.privileges`, and `applications.resources`.
                allOf:
                - "$ref": "#/components/schemas/security.query_role.RoleQueryContainer"
              from:
                description: |-
                  The starting document offset.
                  It must not be negative.
                  By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
                  To page through more hits, use the `search_after` parameter.
                default: 0
                type: number
              sort:
                description: |-
                  The sort definition.
                  You can sort on `name`, `description`, `metadata`, `applications.application`, `applications.privileges`,
                  and `applications.resources`.
                  In 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.
                  It must not be negative.
                  By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters.
                  To page through more hits, use the `search_after` parameter.
                default: 10
                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: |-
                {
                    "sort": ["name"]
                }
            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`.

                '
              value: "{\n  \"query\": {\n    \"match\": {\n      \"description\":
                {\n        \"query\": \"user access\"\n      }\n    }\n  },\n  \"size\":
                1 \n}"
    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.
                  If `false`, the API returns an error with no partial results.
                default: false
                type: boolean
              catalog:
                description: |-
                  The default catalog (cluster) for queries.
                  If 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.
                  The 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.
                  If you specify a cursor, the API only uses the `columnar` and `time_zone` request body parameters.
                  It ignores other request body parameters.
                type: string
              fetch_size:
                description: The maximum number of rows (or entries) to return in
                  one response.
                default: 1000
                type: number
              field_multi_value_leniency:
                description: |-
                  If `false`, the API returns an exception when encountering multiple values for a field.
                  If `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.
                  If `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.
                  After this time period, a pagination request might fail because the scroll cursor is no longer available.
                  Subsequent 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.
                  These 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.
                  It defaults to no timeout, meaning the request waits for complete search results.
                  If the search doesn't finish within this period, the search becomes async.

                  To 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: |-
                {
                  "query": "SELECT * FROM library ORDER BY page_count DESC LIMIT 5"
                }
      required: true
    sql.translate:
      content:
        application/json:
          schema:
            type: object
            properties:
              fetch_size:
                description: The maximum number of rows (or entries) to return in
                  one response.
                default: 1000
                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: |-
                {
                  "query": "SELECT * FROM library ORDER BY page_count DESC",
                  "fetch_size": 10
                }
      required: true
    terms_enum:
      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
                type: number
              timeout:
                description: |-
                  The maximum length of time to spend collecting results.
                  If 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.
                  If it is not provided, all terms in the field are considered.

                  > info
                  > 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.
                  It 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: |-
                {
                    "field" : "tags",
                    "string" : "kiba"
                }
      required: true
    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:
                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.
                  This could be useful in order find out a good characteristic vector of a document.
                  This 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.
                  This is useful in order to generate term vectors in any fashion, especially when using artificial documents.
                  When 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.
                  It 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:

                  * The document count (how many documents contain this field).
                  * The sum of document frequencies (the sum of document frequencies for all terms in this field).
                  * 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:

                  * The total term frequency (how often a term occurs in all documents).
                  * The document frequency (the number of documents containing the current term).

                  By 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.

                  Supported values include:
                    - `internal`: Use internal versioning that starts at 1 and increments with each update or delete.
                    - `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.
                    - `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.
                  NOTE: The `external_gte` version type is meant for special use cases and should be used with care.
                  If used incorrectly, it can result in loss of data.

                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.

                '
              value: |-
                {
                  "fields" : ["text"],
                  "offsets" : true,
                  "payloads" : true,
                  "positions" : true,
                  "term_statistics" : true,
                  "field_statistics" : true
                }
            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.

                '
              value: |-
                {
                  "doc" : {
                    "fullname" : "John Doe",
                    "text" : "test test test"
                  },
                  "fields": ["fullname"],
                  "per_field_analyzer" : {
                    "fullname": "keyword"
                  }
                }
            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.

                '
              value: |-
                {
                  "doc": {
                    "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."
                  },
                  "term_statistics": true,
                  "field_statistics": true,
                  "positions": false,
                  "offsets": false,
                  "filter": {
                    "max_num_terms": 3,
                    "min_term_freq": 1,
                    "min_doc_freq": 1
                  }
                }
            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.

                '
              value: |-
                {
                  "fields" : ["text", "some_field_without_term_vectors"],
                  "offsets" : true,
                  "positions" : true,
                  "term_statistics" : true,
                  "field_statistics" : true
                }
            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.

                '
              value: |-
                {
                  "doc" : {
                    "fullname" : "John Doe",
                    "text" : "test test test"
                  }
                }
    transform.preview_transform:
      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 determines the retry interval in
                  the event of transient failures while the transform is searching or
                  indexing. The minimum value is 1s and the maximum is 1h.
                default: 1m
                allOf:
                - "$ref": "#/components/schemas/_types.Duration"
              pivot:
                description: |-
                  The pivot method transforms the data by aggregating and grouping it.
                  These objects define the group by fields and the aggregation to reduce
                  the data.
                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
                  criteria 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
                  each 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: |-
                {
                  "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"
                        }
                      }
                    }
                  }
                }
  securitySchemes:
    apiKeyAuth:
      description: |
        Elasticsearch APIs use key-based authentication.
        You must create an API key and use the encoded value in the request header.
        For example:


        ```
        curl -X GET "${ES_URL}/_cat/indices?v=true" \
          -H "Authorization: ApiKey ${API_KEY}"
        ```

        For more information about where to find API keys for the Elasticsearch endpoint (${ES_URL}) for a project, go to [Get started with Elasticsearch Serverless](https://www.elastic.co/docs/solutions/search/serverless-elasticsearch-get-started).
      in: header
      name: Authorization
      type: apiKey
