---
type: api
title: Get a watch
description: ## Required authorization
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/operation/operation-watcher-get-watch
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/operation/operation-watcher-get-watch
products:
  - Elasticsearch
---

# Get a watch

Availability: 5.6+

## Paths

- `GET` `/_watcher/watch/{id}`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/authentication#basicauth)
- [Bearer auth](/elastic/docs-builder/docs/4371/api/doc/elasticsearch/authentication#bearerauth)

#### Path Parameters

- `id` (string Name)
  The watch identifier.

## Description



## Required authorization

* Cluster privileges: `monitor_watcher`

## Response

`application/json`

- `found` (boolean)
- `_id` (string Id)
- `status` ({} WatchStatus)
  - `actions` (Actions)
  - `last_checked` (DateTime)
  - `last_met_condition` (DateTime)
  - `state` ({} ActivationState)
    - `active` (boolean)
    - `timestamp` (DateTime)
  - `version` (number VersionNumber)
  - `execution_state` (string)
- `watch` ({} Watch)
  - `actions` (map string to Action)
    Map values ({} Action)
    - `action_type` (enum ActionType)
      Values: `email`, `webhook`, `index`, `logging`, `slack`, `pagerduty`
    - `condition` ({} ConditionContainer)
      - `always` (AlwaysCondition)
      - `array_compare` (map string to ArrayCompareCondition)
        Map values ({} ArrayCompareCondition)
        - `path` (string)
      - `compare` (map string to string to FieldValue)
      - `never` (NeverCondition)
      - `script` ({} ScriptCondition)
        - `lang` (ScriptLanguage · default: painless)
          

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
          Values: `painless`, `expression`, `mustache`, `java`
        - `params` (map string to object)
        - `source` (ScriptSource)
        - `id` (string)
    - `foreach` (string)
    - `max_iterations` (number)
    - `name` (string Name)
    - `throttle_period` (string Duration)
    - `throttle_period_in_millis` (DurationValueUnitMillis)
    - `transform` ({} TransformContainer)
      - `chain` ([] TransformContainer) — recursive
        Same fields as `transform` in `actions`
      - `script` ({} ScriptTransform)
        - `lang` (string · default: painless)
        - `params` (map string to object)
        - `source` (ScriptSource)
        - `id` (string)
      - `search` ({} SearchTransform)
        - `request` ({} SearchInputRequestDefinition)
          - `body` ({} SearchRequestBody)
            - `aggregations` (map string to {} AggregationContainer)
              Defines the aggregations that are run as part of the search request.
              See [AggregationContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-aggregations-aggregationcontainer)
            - `collapse` ({} FieldCollapse)
              Collapses search results the values of the specified field.
              - `field` (string Field)
                The field to collapse the result set on
              - `inner_hits` (union oneOf)
                The number of inner hits and their sort order
                `InnerHits` or `InnerHits[]`
                - `name` (string Name)
                  The name for the particular inner hit definition in the response.
Useful when a search request contains multiple inner hits.
                - `size` (number · default: 3)
                  The maximum number of hits to return per `inner_hits`.
                - `from` (number · default: 0)
                  Inner hit starting document offset.
                - `collapse` ({} FieldCollapse) — recursive
                  Same fields as `collapse` in `body`
                - `docvalue_fields` ([] FieldAndFormat)
                  - `field` (string Field)
                    A wildcard pattern. The request returns values for field names matching this pattern.
                  - `format` (string)
                    The format in which the values are returned.
                  - `include_unmapped` (boolean)
                - `explain` (boolean)
                - `highlight` ({} Highlight)
                  - `type` (HighlighterType)
                    

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.
                    Values: `plain`, `fvh`, `unified`
                  - `boundary_chars` (string · default: .,!? \t\n)
                    A string that contains each boundary character.
                  - `boundary_max_scan` (number · default: 20)
                    How far to scan for boundary characters.
                  - `boundary_scanner` (enum BoundaryScanner)
                    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`.
                    Values: `chars`, `sentence`, `word`
                  - `boundary_scanner_locale` (string · default: Locale.ROOT)
                    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"`.
                  - `force_source` (boolean) — deprecated
                  - `fragmenter` (enum HighlighterFragmenter · default: span)
                    Specifies how text should be broken up in highlight snippets: `simple` or `span`.
Only valid for the `plain` highlighter.
                    Values: `simple`, `span`
                  - `fragment_size` (number · default: 100)
                    The size of the highlighted fragment in characters.
                  - `highlight_filter` (boolean)
                  - `highlight_query` ({} QueryContainer)
                    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.
                    See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                  - `max_fragment_length` (number)
                  - `max_analyzed_offset` (number)
                    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.
                  - `no_match_size` (number · default: 0)
                    The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.
                  - `number_of_fragments` (number · default: 5)
                    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.
                  - `options` (map string to object)
                  - `order` (enum HighlighterOrder · default: none)
                    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.
                    Values: `score`
                  - `phrase_limit` (number · default: 256)
                    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.
                  - `post_tags` ([] string)
                    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.
                  - `pre_tags` ([] string)
                    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.
                  - `require_field_match` (boolean · default: true)
                    By default, only fields that contains a query match are highlighted.
Set to `false` to highlight all fields.
                  - `tags_schema` (enum HighlighterTagsSchema)
                    Set to `styled` to use the built-in tag schema.
                    Values: `styled`
                  - `encoder` (enum HighlighterEncoder)
                    Values: `default`, `html`
                  - `fields` (union oneOf)
                    `map string to HighlightField` or `[] map string to HighlightField`
                - `ignore_unmapped` (boolean)
                - `script_fields` (map string to ScriptField)
                  Map values ({} ScriptField)
                  - `script` (string Script)
                  - `ignore_failure` (boolean)
                - `seq_no_primary_term` (boolean)
                - `field` ([] string Field)
                - `fields` ([] FieldAndFormat)
                  - `field` (string Field)
                    A wildcard pattern. The request returns values for field names matching this pattern.
                  - `format` (string)
                    The format in which the values are returned.
                  - `include_unmapped` (boolean)
                - `sort` (Sort)
                  How the inner hits should be sorted per `inner_hits`.
By default, inner hits are sorted by score.
                - `_source` (SourceConfig)
                - `stored_fields` (string Fields)
                - `track_scores` (boolean · default: false)
                - `version` (boolean)
              - `max_concurrent_group_searches` (number)
                The number of concurrent requests allowed to retrieve the inner_hits per group
              - `collapse` ({} FieldCollapse) — recursive
                Same fields as `collapse` in `body`
            - `explain` (boolean · default: false)
              If `true`, the request returns detailed information about score computation as part of a hit.
            - `ext` (map string to object)
              Configuration of search extensions defined by Elasticsearch plugins.
            - `from` (number · default: 0)
              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.
            - `highlight` ({} Highlight)
              Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results.
              Same fields as `highlight` in `inner_hits`
            - `track_total_hits` (boolean | number · default: 10000)
              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.
            - `indices_boost` ([] string to number)
              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.
            - `docvalue_fields` ([] FieldAndFormat)
              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.
              - `field` (string Field)
                A wildcard pattern. The request returns values for field names matching this pattern.
              - `format` (string)
                The format in which the values are returned.
              - `include_unmapped` (boolean)
            - `knn` (union oneOf)
              The approximate kNN search to run.
              `KnnSearch` or `KnnSearch[]`
              - `field` (string Field)
                The name of the vector field to search against
              - `query_vector` (QueryVector)
                The query vector
              - `query_vector_builder` ({} QueryVectorBuilder)
                The query vector builder. You must provide a query_vector_builder or query_vector, but not both.
                - `embedding` ({} Embedding)
                  - `inference_id` (string)
                  - `input` (KnnEmbeddingInput)
                  - `timeout` (string Duration)
                - `text_embedding` ({} TextEmbedding)
                  - `model_id` (string)
                    Model ID is required for all dense_vector fields but
may be inferred for semantic_text fields
                  - `model_text` (string)
                    The text to be converted into a vector by the specified model
                - `lookup` ({} LookupQueryVectorBuilder)
                  Lookup a vector from an existing document.
Must reference a dense_vector field and a single value.
                  - `id` (string)
                    The ID of the document to fetch the vector from
                  - `index` (string)
                    The name of the index to fetch the document from
                  - `path` (string)
                    The name of the field containing the vector
                  - `routing` (string)
                    The routing value to use when fetching the document
              - `k` (number)
                The final number of nearest neighbors to return as top hits
              - `num_candidates` (number)
                The number of nearest neighbor candidates to consider per shard
              - `visit_percentage` (number)
                The percentage of vectors to explore per shard while doing knn search with bbq_disk
              - `boost` (number)
                Boost value to apply to kNN scores
              - `filter` (union oneOf)
                Filters for the kNN search query
                One of: [`QueryContainer[]`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer) or [`QueryContainer`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
              - `similarity` (number)
                The minimum similarity for a vector to be considered a match
              - `inner_hits` ({} InnerHits)
                If defined, each search hit will contain inner hits.
                - `name` (string Name)
                  The name for the particular inner hit definition in the response.
Useful when a search request contains multiple inner hits.
                - `size` (number · default: 3)
                  The maximum number of hits to return per `inner_hits`.
                - `from` (number · default: 0)
                  Inner hit starting document offset.
                - `collapse` ({} FieldCollapse)
                  - `field` (string Field)
                    The field to collapse the result set on
                  - `inner_hits` (union oneOf) — recursive
                    The number of inner hits and their sort order
                    `InnerHits` or `InnerHits[]`
                  - `max_concurrent_group_searches` (number)
                    The number of concurrent requests allowed to retrieve the inner_hits per group
                  - `collapse` ({} FieldCollapse) — recursive
                    Same fields as `collapse` in `inner_hits`
                - `docvalue_fields` ([] FieldAndFormat)
                  - `field` (string Field)
                    A wildcard pattern. The request returns values for field names matching this pattern.
                  - `format` (string)
                    The format in which the values are returned.
                  - `include_unmapped` (boolean)
                - `explain` (boolean)
                - `highlight` ({} Highlight)
                  Same fields as `highlight` in `inner_hits`
                - `ignore_unmapped` (boolean)
                - `script_fields` (map string to ScriptField)
                  Map values ({} ScriptField)
                  - `script` (string Script)
                  - `ignore_failure` (boolean)
                - `seq_no_primary_term` (boolean)
                - `field` ([] string Field)
                - `fields` ([] FieldAndFormat)
                  - `field` (string Field)
                    A wildcard pattern. The request returns values for field names matching this pattern.
                  - `format` (string)
                    The format in which the values are returned.
                  - `include_unmapped` (boolean)
                - `sort` (Sort)
                  How the inner hits should be sorted per `inner_hits`.
By default, inner hits are sorted by score.
                - `_source` (SourceConfig)
                - `stored_fields` (string Fields)
                - `track_scores` (boolean · default: false)
                - `version` (boolean)
              - `rescore_vector` ({} RescoreVector)
                Apply oversampling and rescoring to quantized vectors
                - `oversample` (number)
                  Applies the specified oversample factor to k on the approximate kNN search
              - `_name` (string)
            - `rank` ({} RankContainer)
              The Reciprocal Rank Fusion (RRF) to use.
              - `rrf` ({} RrfRank)
                The reciprocal rank fusion parameters
                - `rank_constant` (number)
                  How much influence documents in individual result sets per query have over the final ranked result set
                - `rank_window_size` (number)
                  Size of the individual result sets per query
            - `min_score` (number)
              The minimum `_score` for matching documents.
Documents with a lower `_score` are not included in search results or results collected by aggregations.
            - `post_filter` ({} QueryContainer)
              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.
              See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
            - `profile` (boolean · default: false)
              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.
            - `query` ({} QueryContainer)
              The search definition using the Query DSL.
              See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
            - `rescore` (union oneOf)
              Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.
              `Rescore` or `Rescore[]`
              - `window_size` (number)
              - `query` ({} RescoreQuery)
                - `rescore_query` ({} QueryContainer)
                  The query to use for rescoring.
This query is only run on the Top-K results returned by the `query` and `post_filter` phases.
                  See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                - `query_weight` (number · default: 1)
                  Relative importance of the original query versus the rescore query.
                - `rescore_query_weight` (number · default: 1)
                  Relative importance of the rescore query versus the original query.
                - `score_mode` (enum ScoreMode · default: total)
                  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.
                  Values: `avg`, `max`, `min`, `multiply`, `total`
              - `learning_to_rank` ({} LearningToRank)
                - `model_id` (string)
                  The unique identifier of the trained model uploaded to Elasticsearch
                - `params` (map string to object)
                  Named parameters to be passed to the query templates used for feature
              - `script` ({} ScriptRescore)
                - `script` (string Script)
            - `retriever` ({} RetrieverContainer)
              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`.
              - `standard` ({} StandardRetriever)
                A retriever that replaces the functionality of a traditional query.
                - `filter` (union oneOf)
                  Query to filter the documents that can match.
                  One of: [`QueryContainer[]`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer) or [`QueryContainer`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                  See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                - `min_score` (number)
                  Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
                - `_name` (string)
                  Retriever name.
                - `query` ({} QueryContainer)
                  Defines a query to retrieve a set of top documents.
                  See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                - `search_after` (SortResults)
                  Defines a search after object parameter used for pagination.
                - `terminate_after` (number)
                  Maximum number of documents to collect for each shard.
                - `sort` (Sort)
                  A sort object that that specifies the order of matching documents.
                - `collapse` ({} FieldCollapse)
                  Collapses the top documents by a specified key into a single top document per key.
                  Same fields as `collapse` in `body`
              - `knn` ({} KnnRetriever)
                A retriever that replaces the functionality  of a knn search.
                - `filter` (union oneOf)
                  Query to filter the documents that can match.
                  One of: [`QueryContainer[]`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer) or [`QueryContainer`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                  See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                - `min_score` (number)
                  Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
                - `_name` (string)
                  Retriever name.
                - `field` (string)
                  The name of the vector field to search against.
                - `query_vector` (QueryVector)
                  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.
                - `query_vector_builder` ({} QueryVectorBuilder)
                  Defines a model to build a query vector.
                  Same fields as `query_vector_builder` in `knn`
                - `k` (number)
                  Number of nearest neighbors to return as top hits.
                - `num_candidates` (number)
                  Number of nearest neighbor candidates to consider per shard.
                - `visit_percentage` (number)
                  The percentage of vectors to explore per shard while doing knn search with bbq_disk
                - `similarity` (number)
                  The minimum similarity required for a document to be considered a match.
                - `rescore_vector` ({} RescoreVector)
                  Apply oversampling and rescoring to quantized vectors
                  - `oversample` (number)
                    Applies the specified oversample factor to k on the approximate kNN search
              - `rrf` ({} RRFRetriever)
                A retriever that produces top documents from reciprocal rank fusion (RRF).
                - `filter` (union oneOf)
                  Query to filter the documents that can match.
                  One of: [`QueryContainer[]`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer) or [`QueryContainer`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                  See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                - `min_score` (number)
                  Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
                - `_name` (string)
                  Retriever name.
                - `retrievers` ([] union RRFRetrieverEntry) — recursive
                  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.
                - `rank_constant` (number)
                  This value determines how much influence documents in individual result sets per query have over the final ranked result set.
                - `rank_window_size` (number)
                  This value determines the size of the individual result sets per query.
                - `query` (string)
                - `fields` ([] string)
              - `text_similarity_reranker` ({} TextSimilarityReranker)
                A retriever that reranks the top documents based on a reranking model using the InferenceAPI
                - `filter` (union oneOf)
                  Query to filter the documents that can match.
                  One of: [`QueryContainer[]`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer) or [`QueryContainer`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                  See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                - `min_score` (number)
                  Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
                - `_name` (string)
                  Retriever name.
                - `retriever` ({} RetrieverContainer) — recursive
                  The nested retriever which will produce the first-level results, that will later be used for reranking.
                  Same fields as `retriever` in `body`
                - `rank_window_size` (number)
                  This value determines how many documents we will consider from the nested retriever.
                - `inference_id` (string)
                  Unique identifier of the inference endpoint created using the inference API.
                - `inference_text` (string)
                  The text snippet used as the basis for similarity comparison.
                - `field` (string)
                  The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text.
                - `chunk_rescorer` ({} ChunkRescorer)
                  Whether to rescore on only the best matching chunks.
                  - `size` (number)
                    The number of chunks per document to evaluate for reranking.
                  - `chunking_settings` ({} ChunkRescorerChunkingSettings)
                    Chunking settings to apply
                    - `max_chunk_size` (number · default: 250)
                      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.
                    - `overlap` (number · default: 100)
                      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.
                    - `sentence_overlap` (number · default: 1)
                      The number of overlapping sentences for chunks.
It is applicable only for a `sentence` chunking strategy.
It can be either `1` or `0`.
                    - `separator_group` (string)
                      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.
                    - `separators` ([] string)
                      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.
                    - `strategy` (string · default: sentence)
                      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.
              - `rule` ({} RuleRetriever)
                A retriever that replaces the functionality of a rule query.
                - `filter` (union oneOf)
                  Query to filter the documents that can match.
                  One of: [`QueryContainer[]`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer) or [`QueryContainer`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                  See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                - `min_score` (number)
                  Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
                - `_name` (string)
                  Retriever name.
                - `ruleset_ids` (union Id | [] Id)
                  The ruleset IDs containing the rules this retriever is evaluating against.
                - `match_criteria` (object)
                  The match criteria that will determine if a rule in the provided rulesets should be applied.
                - `retriever` ({} RetrieverContainer) — recursive
                  The retriever whose results rules should be applied to.
                  Same fields as `retriever` in `body`
                - `rank_window_size` (number)
                  This value determines the size of the individual result set.
              - `rescorer` ({} RescorerRetriever)
                A retriever that re-scores only the results produced by its child retriever.
                - `filter` (union oneOf)
                  Query to filter the documents that can match.
                  One of: [`QueryContainer[]`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer) or [`QueryContainer`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                  See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                - `min_score` (number)
                  Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
                - `_name` (string)
                  Retriever name.
                - `retriever` ({} RetrieverContainer) — recursive
                  Inner retriever.
                  Same fields as `retriever` in `body`
                - `rescore` (union oneOf)
                  Same options as `rescore` in `body`
                  `Rescore` or `Rescore[]`
              - `linear` ({} LinearRetriever)
                A retriever that supports the combination of different retrievers through a weighted linear combination.
                - `filter` (union oneOf)
                  Query to filter the documents that can match.
                  One of: [`QueryContainer[]`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer) or [`QueryContainer`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                  See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                - `min_score` (number)
                  Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
                - `_name` (string)
                  Retriever name.
                - `retrievers` ([] InnerRetriever)
                  Inner retrievers.
                  - `retriever` ({} RetrieverContainer) — recursive
                    The nested retriever configuration.
                    Same fields as `retriever` in `body`
                  - `weight` (number · default: 1)
                    Weight multiplier for this retriever's contribution to the linear combination.
Must be non-negative.
                  - `normalizer` (enum ScoreNormalizer · default: none)
                    Score normalizer to apply to this retriever's results before weighting.
Falls back to the top-level `normalizer` on the linear retriever if unset,
then to `none` (identity) if neither is set.
                    Values: `none`, `minmax`, `l2_norm`
                - `rank_window_size` (number)
                - `query` (string)
                - `fields` ([] string)
                - `normalizer` (enum ScoreNormalizer)
                  Values: `none`, `minmax`, `l2_norm`
              - `pinned` ({} PinnedRetriever)
                A pinned retriever applies pinned documents to the underlying retriever.
This retriever will rewrite to a PinnedQueryBuilder.
                - `filter` (union oneOf)
                  Query to filter the documents that can match.
                  One of: [`QueryContainer[]`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer) or [`QueryContainer`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                  See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                - `min_score` (number)
                  Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
                - `_name` (string)
                  Retriever name.
                - `retriever` ({} RetrieverContainer) — recursive
                  Inner retriever.
                  Same fields as `retriever` in `body`
                - `ids` ([] string)
                - `docs` ([] SpecifiedDocument)
                  - `index` (string IndexName)
                  - `id` (string Id)
                - `rank_window_size` (number)
              - `diversify` ({} DiversifyRetriever)
                A retriever that diversifies the results from its child retriever.
                - `filter` (union oneOf)
                  Query to filter the documents that can match.
                  One of: [`QueryContainer[]`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer) or [`QueryContainer`](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                  See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
                - `min_score` (number)
                  Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
                - `_name` (string)
                  Retriever name.
                - `type` (enum DiversifyRetrieverTypes)
                  The diversification strategy to apply.
                  Values: `mmr`
                - `field` (string)
                  The document field on which to diversify results on.
                - `retriever` ({} RetrieverContainer) — recursive
                  The nested retriever whose results will be diversified.
                  Same fields as `retriever` in `body`
                - `size` (number)
                  The number of top documents to return after diversification.
                - `rank_window_size` (number)
                  The number of top documents from the nested retriever to consider for diversification.
                - `query_vector` (QueryVector)
                  The query vector used for diversification.
                - `query_vector_builder` ({} QueryVectorBuilder)
                  a dense vector query vector builder to use instead of a static query_vector
                  Same fields as `query_vector_builder` in `knn`
                - `lambda` (number)
                  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
            - `script_fields` (map string to ScriptField)
              Retrieve a script evaluation (based on different fields) for each hit.
              Map values ({} ScriptField)
              - `script` (string Script)
              - `ignore_failure` (boolean)
            - `search_after` (SortResults)
              Used to retrieve the next page of hits using a set of sort values from the previous page.
            - `size` (number · default: 10)
              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.
            - `slice` ({} SlicedScroll)
              Split a scrolled search into multiple slices that can be consumed independently.
              - `field` (string Field)
              - `id` (string Id)
              - `max` (number)
            - `sort` (Sort)
              A comma-separated list of <field>:<direction> pairs.
            - `_source` (SourceConfig)
              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`.
            - `fields` ([] FieldAndFormat)
              An array of wildcard (`*`) field patterns.
The request returns values for field names matching these patterns in the `hits.fields` property of the response.
              - `field` (string Field)
                A wildcard pattern. The request returns values for field names matching this pattern.
              - `format` (string)
                The format in which the values are returned.
              - `include_unmapped` (boolean)
            - `suggest` ({} Suggester)
              Defines a suggester that provides similar looking terms based on a provided text.
              - `text` (string)
                Global suggest text, to avoid repetition when the same text is used in several suggesters
            - `terminate_after` (number · default: 0)
              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.
            - `timeout` (string)
              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.
            - `track_scores` (boolean · default: false)
              If `true`, calculate and return document scores, even if the scores are not used for sorting.
            - `version` (boolean · default: false)
              If `true`, the request returns the document version as part of a hit.
            - `seq_no_primary_term` (boolean)
              If `true`, the request returns sequence number and primary term of the last modification of each hit.
            - `stored_fields` (string Fields)
              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.
            - `pit` ({} PointInTimeReference)
              Limit the search to a point in time (PIT).
If you provide a PIT, you cannot specify an `<index>` in the request path.
              - `id` (string Id)
              - `keep_alive` (string Duration)
            - `runtime_mappings` (RuntimeFields)
              One or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
            - `stats` ([] string)
              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.
          - `indices` (string Indices)
          - `indices_options` ({} IndicesOptions)
            - `allow_no_indices` (boolean)
              A setting that does two separate checks on the index expression.
If `false`, the request returns an error (1) if any wildcard expression
(including `_all` and `*`) resolves to zero matching indices or (2) if the
complete set of resolved indices, aliases or data streams is empty after all
expressions are evaluated. If `true`, index expressions that resolve to no
indices are allowed and the request returns an empty result.
            - `expand_wildcards` (string ExpandWildcards)
              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.
              Values: `all`, `open`, `closed`, `hidden`, `none`
            - `ignore_unavailable` (boolean · default: false)
              If `false`, the request returns an error if it targets a concrete (non-wildcarded)
index, alias, or data stream that is missing, closed, or otherwise unavailable.
If `true`, unavailable concrete targets are silently ignored.
            - `ignore_throttled` (boolean · default: true)
              If true, concrete, expanded or aliased indices are ignored when frozen.
          - `search_type` (enum SearchType)
            

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.
            Values: `query_then_fetch`, `dfs_query_then_fetch`
          - `template` ({} SearchTemplateRequestBody)
            - `explain` (boolean · default: false)
            - `id` (string Id)
              ID of the search template to use. If no source is specified,
this parameter is required.
            - `lang` (ScriptLanguage · default: mustache)
              The language the template is written in.
It is reported in the resolved search input of a watch record.

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
              Values: `painless`, `expression`, `mustache`, `java`
            - `params` (map string to object)
            - `profile` (boolean · default: false)
            - `source` (string)
              An inline search template. Supports the same parameters as the search API's
request body. Also supports Mustache variables. If no id is specified, this
parameter is required.
          - `rest_total_hits_as_int` (boolean)
        - `timeout` (string Duration)
    - `index` ({} IndexAction)
      - `index` (string IndexName)
      - `doc_id` (string Id)
      - `refresh` (enum Refresh)
        Values: `true`, `false`, `wait_for`
      - `op_type` (enum OpType · default: index)
        

Supported values include:
  - `index`: Overwrite any documents that already exist.
  - `create`: Only index documents that do not already exist.
        Values: `index`, `create`
      - `timeout` (string Duration · default: 60s)
      - `execution_time_field` (string Field)
    - `logging` ({} LoggingAction)
      - `level` (string)
      - `text` (string)
      - `category` (string)
    - `email` ({} EmailAction)
      - `id` (string Id)
      - `bcc` (union string | [] string)
      - `body` ({} EmailBody)
        - `html` (string)
        - `text` (string)
      - `cc` (union string | [] string)
      - `from` (string)
      - `priority` (enum EmailPriority)
        Values: `lowest`, `low`, `normal`, `high`, `highest`
      - `reply_to` (union string | [] string)
      - `sent_date` (DateTime)
      - `subject` (string)
      - `to` (union string | [] string)
      - `attachments` (map string to EmailAttachmentContainer)
        Map values ({} EmailAttachmentContainer)
        - `http` ({} HttpEmailAttachment)
          - `content_type` (string)
          - `inline` (boolean)
          - `request` ({} HttpInputRequestDefinition)
            - `auth` ({} HttpInputAuthentication)
              - `basic` ({} HttpInputBasicAuthentication)
                - `password` (string)
                - `username` (string)
            - `body` (string)
            - `connection_timeout` (string Duration)
            - `headers` (map string to string)
            - `host` (string)
            - `method` (enum HttpInputMethod)
              Values: `head`, `get`, `post`, `put`, `delete`
            - `params` (map string to string)
            - `path` (string)
            - `port` (number uint)
            - `proxy` ({} HttpInputProxy)
              - `host` (string)
              - `port` (number uint)
            - `read_timeout` (string Duration)
            - `scheme` (enum ConnectionScheme)
              Values: `http`, `https`
            - `url` (string)
        - `reporting` ({} ReportingEmailAttachment)
          - `url` (string)
          - `inline` (boolean)
          - `retries` (number · default: 40)
          - `interval` (string Duration · default: 15s)
          - `request` ({} HttpInputRequestDefinition)
            Same fields as `request` in `http`
        - `data` ({} DataEmailAttachment)
          - `format` (enum DataAttachmentFormat)
            Values: `json`, `yaml`
    - `pagerduty` ({} PagerDutyAction)
      - `account` (string)
      - `attach_payload` (boolean)
      - `client` (string)
      - `client_url` (string)
      - `contexts` ([] PagerDutyContext)
        - `href` (string)
        - `src` (string)
        - `type` (enum PagerDutyContextType)
          Values: `link`, `image`
      - `description` (string)
      - `event_type` (enum PagerDutyEventType · default: trigger)
        Values: `trigger`, `resolve`, `acknowledge`
      - `incident_key` (string)
      - `proxy` ({} PagerDutyEventProxy)
        - `host` (string)
        - `port` (number)
    - `slack` ({} SlackAction)
      - `account` (string)
      - `message` ({} SlackMessage)
        - `attachments` ([] SlackAttachment)
          - `author_icon` (string)
          - `author_link` (string)
          - `author_name` (string)
          - `color` (string)
          - `fallback` (string)
          - `fields` ([] SlackAttachmentField)
            - `short` (boolean)
            - `title` (string)
            - `value` (string)
          - `footer` (string)
          - `footer_icon` (string)
          - `image_url` (string)
          - `pretext` (string)
          - `text` (string)
          - `thumb_url` (string)
          - `title` (string)
          - `title_link` (string)
          - `ts` (EpochTimeUnitSeconds)
        - `dynamic_attachments` ({} SlackDynamicAttachment)
          - `attachment_template` ({} SlackAttachment)
            Same fields as `attachments` in `message`
          - `list_path` (string)
        - `from` (string)
        - `icon` (string)
        - `text` (string)
        - `to` ([] string)
    - `webhook` ({} WebhookAction)
      - `auth` ({} HttpInputAuthentication)
        - `basic` ({} HttpInputBasicAuthentication)
          - `password` (string)
          - `username` (string)
      - `body` (string)
      - `connection_timeout` (string Duration)
      - `headers` (map string to string)
      - `host` (string)
      - `method` (enum HttpInputMethod)
        Values: `head`, `get`, `post`, `put`, `delete`
      - `params` (map string to string)
      - `path` (string)
      - `port` (number uint)
      - `proxy` ({} HttpInputProxy)
        - `host` (string)
        - `port` (number uint)
      - `read_timeout` (string Duration)
      - `scheme` (enum ConnectionScheme)
        Values: `http`, `https`
      - `url` (string)
  - `condition` ({} ConditionContainer)
    Same fields as `condition` in `actions`
  - `input` ({} InputContainer)
    - `chain` ({} ChainInput)
      - `inputs` ([] string to InputContainer) — recursive
        Same fields as `input` in `watch`
    - `http` ({} HttpInput)
      - `extract` ([] string)
      - `request` ({} HttpInputRequestDefinition)
        Same fields as `request` in `http`
      - `response_content_type` (enum ResponseContentType)
        Values: `json`, `yaml`, `text`
    - `search` ({} SearchInput)
      - `extract` ([] string)
      - `request` ({} SearchInputRequestDefinition)
        - `body` ({} SearchRequestBody)
          - `aggregations` (map string to {} AggregationContainer)
            Defines the aggregations that are run as part of the search request.
            See [AggregationContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-aggregations-aggregationcontainer)
          - `collapse` ({} FieldCollapse)
            Collapses search results the values of the specified field.
            Same fields as `collapse` in `body`
          - `explain` (boolean · default: false)
            If `true`, the request returns detailed information about score computation as part of a hit.
          - `ext` (map string to object)
            Configuration of search extensions defined by Elasticsearch plugins.
          - `from` (number · default: 0)
            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.
          - `highlight` ({} Highlight)
            Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results.
            Same fields as `highlight` in `inner_hits`
          - `track_total_hits` (boolean | number · default: 10000)
            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.
          - `indices_boost` ([] string to number)
            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.
          - `docvalue_fields` ([] FieldAndFormat)
            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.
            - `field` (string Field)
              A wildcard pattern. The request returns values for field names matching this pattern.
            - `format` (string)
              The format in which the values are returned.
            - `include_unmapped` (boolean)
          - `knn` (union oneOf)
            The approximate kNN search to run.
            Same options as `knn` in `body`
            `KnnSearch` or `KnnSearch[]`
          - `rank` ({} RankContainer)
            The Reciprocal Rank Fusion (RRF) to use.
            - `rrf` ({} RrfRank)
              The reciprocal rank fusion parameters
              - `rank_constant` (number)
                How much influence documents in individual result sets per query have over the final ranked result set
              - `rank_window_size` (number)
                Size of the individual result sets per query
          - `min_score` (number)
            The minimum `_score` for matching documents.
Documents with a lower `_score` are not included in search results or results collected by aggregations.
          - `post_filter` ({} QueryContainer)
            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.
            See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
          - `profile` (boolean · default: false)
            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.
          - `query` ({} QueryContainer)
            The search definition using the Query DSL.
            See [QueryContainer](https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/elasticsearch/types/_types-query_dsl-querycontainer)
          - `rescore` (union oneOf)
            Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the `query` and `post_filter` phases.
            Same options as `rescore` in `body`
            `Rescore` or `Rescore[]`
          - `retriever` ({} RetrieverContainer)
            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`.
            Same fields as `retriever` in `body`
          - `script_fields` (map string to ScriptField)
            Retrieve a script evaluation (based on different fields) for each hit.
            Map values ({} ScriptField)
            - `script` (string Script)
            - `ignore_failure` (boolean)
          - `search_after` (SortResults)
            Used to retrieve the next page of hits using a set of sort values from the previous page.
          - `size` (number · default: 10)
            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.
          - `slice` ({} SlicedScroll)
            Split a scrolled search into multiple slices that can be consumed independently.
            - `field` (string Field)
            - `id` (string Id)
            - `max` (number)
          - `sort` (Sort)
            A comma-separated list of <field>:<direction> pairs.
          - `_source` (SourceConfig)
            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`.
          - `fields` ([] FieldAndFormat)
            An array of wildcard (`*`) field patterns.
The request returns values for field names matching these patterns in the `hits.fields` property of the response.
            - `field` (string Field)
              A wildcard pattern. The request returns values for field names matching this pattern.
            - `format` (string)
              The format in which the values are returned.
            - `include_unmapped` (boolean)
          - `suggest` ({} Suggester)
            Defines a suggester that provides similar looking terms based on a provided text.
            - `text` (string)
              Global suggest text, to avoid repetition when the same text is used in several suggesters
          - `terminate_after` (number · default: 0)
            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.
          - `timeout` (string)
            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.
          - `track_scores` (boolean · default: false)
            If `true`, calculate and return document scores, even if the scores are not used for sorting.
          - `version` (boolean · default: false)
            If `true`, the request returns the document version as part of a hit.
          - `seq_no_primary_term` (boolean)
            If `true`, the request returns sequence number and primary term of the last modification of each hit.
          - `stored_fields` (string Fields)
            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.
          - `pit` ({} PointInTimeReference)
            Limit the search to a point in time (PIT).
If you provide a PIT, you cannot specify an `<index>` in the request path.
            - `id` (string Id)
            - `keep_alive` (string Duration)
          - `runtime_mappings` (RuntimeFields)
            One or more runtime fields in the search request.
These fields take precedence over mapped fields with the same name.
          - `stats` ([] string)
            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.
        - `indices` (string Indices)
        - `indices_options` ({} IndicesOptions)
          - `allow_no_indices` (boolean)
            A setting that does two separate checks on the index expression.
If `false`, the request returns an error (1) if any wildcard expression
(including `_all` and `*`) resolves to zero matching indices or (2) if the
complete set of resolved indices, aliases or data streams is empty after all
expressions are evaluated. If `true`, index expressions that resolve to no
indices are allowed and the request returns an empty result.
          - `expand_wildcards` (string ExpandWildcards)
            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.
            Values: `all`, `open`, `closed`, `hidden`, `none`
          - `ignore_unavailable` (boolean · default: false)
            If `false`, the request returns an error if it targets a concrete (non-wildcarded)
index, alias, or data stream that is missing, closed, or otherwise unavailable.
If `true`, unavailable concrete targets are silently ignored.
          - `ignore_throttled` (boolean · default: true)
            If true, concrete, expanded or aliased indices are ignored when frozen.
        - `search_type` (enum SearchType)
          

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.
          Values: `query_then_fetch`, `dfs_query_then_fetch`
        - `template` ({} SearchTemplateRequestBody)
          - `explain` (boolean · default: false)
          - `id` (string Id)
            ID of the search template to use. If no source is specified,
this parameter is required.
          - `lang` (ScriptLanguage · default: mustache)
            The language the template is written in.
It is reported in the resolved search input of a watch record.

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
            Values: `painless`, `expression`, `mustache`, `java`
          - `params` (map string to object)
          - `profile` (boolean · default: false)
          - `source` (string)
            An inline search template. Supports the same parameters as the search API's
request body. Also supports Mustache variables. If no id is specified, this
parameter is required.
        - `rest_total_hits_as_int` (boolean)
      - `timeout` (string Duration)
    - `simple` (map string to object)
    - `transform` ({} TransformContainer)
      - `chain` ([] TransformContainer) — recursive
        Same fields as `transform` in `input`
      - `script` ({} ScriptTransform)
        - `lang` (string · default: painless)
        - `params` (map string to object)
        - `source` (ScriptSource)
        - `id` (string)
      - `search` ({} SearchTransform)
        - `request` ({} SearchInputRequestDefinition)
          Same fields as `request` in `search`
        - `timeout` (string Duration)
  - `metadata` (Metadata)
  - `status` ({} WatchStatus)
    - `actions` (Actions)
    - `last_checked` (DateTime)
    - `last_met_condition` (DateTime)
    - `state` ({} ActivationState)
      - `active` (boolean)
      - `timestamp` (DateTime)
    - `version` (number VersionNumber)
    - `execution_state` (string)
  - `throttle_period` (string Duration)
  - `throttle_period_in_millis` (DurationValueUnitMillis)
  - `transform` ({} TransformContainer)
    - `chain` ([] TransformContainer) — recursive
      Same fields as `transform` in `watch`
    - `script` ({} ScriptTransform)
      - `lang` (string · default: painless)
      - `params` (map string to object)
      - `source` (ScriptSource)
      - `id` (string)
    - `search` ({} SearchTransform)
      - `request` ({} SearchInputRequestDefinition)
        Same fields as `request` in `search`
      - `timeout` (string Duration)
  - `trigger` ({} TriggerContainer)
    - `schedule` ({} ScheduleContainer)
      - `timezone` (string)
      - `cron` (string)
      - `daily` ({} DailySchedule)
        - `at` ([] union ScheduleTimeOfDay)
          - **string**
          - **HourAndMinute**
            - `hour` ([] number)
            - `minute` ([] number)
      - `hourly` ({} HourlySchedule)
        - `minute` ([] number)
      - `interval` (string Duration)
      - `monthly` (union oneOf)
        `TimeOfMonth` or `TimeOfMonth[]`
        - `at` ([] string)
        - `on` ([] number)
      - `weekly` (union oneOf)
        `TimeOfWeek` or `TimeOfWeek[]`
        - `at` ([] string)
        - `on` ([] enum Day)
          Values: `sunday`, `monday`, `tuesday`, `wednesday`, `thursday`, `friday`, `saturday`
      - `yearly` (union oneOf)
        `TimeOfYear` or `TimeOfYear[]`
        - `at` ([] string)
        - `int` ([] enum Month)
          Values: `january`, `february`, `march`, `april`, `may`, `june`, `july`, `august`, `september`, `october`, `november`, `december`
        - `on` ([] number)
- `_primary_term` (number)
- `_seq_no` (number SequenceNumber)
- `_version` (number VersionNumber)
## Code Examples

#### Console

```console
GET _watcher/watch/my_watch
```

#### JavaScript

```javascript
const response = await client.watcher.getWatch({
  id: "my_watch",
});
```

#### Python

```python
resp = client.watcher.get_watch(
    id="my_watch",
)
```

#### curl

```curl
curl -X GET "$ELASTICSEARCH_URL/_watcher/watch/my_watch" \
  -H "Authorization: ApiKey $ELASTIC_API_KEY"
```

#### Java

```java
client.watcher().getWatch(g -> g
    .id("my_watch")
);
```

#### PHP

```php
$resp = $client->watcher()->getWatch([
    "id" => "my_watch",
]);
```

#### Ruby

```ruby
response = client.watcher.get_watch(
  id: "my_watch"
)
```

## Response Examples

#### Get watch response example1

A successful response from `GET _watcher/watch/my_watch`.

```json
{
  "found": true,
  "_id": "my_watch",
  "_seq_no": 0,
  "_primary_term": 1,
  "_version": 1,
  "status": { 
    "version": 1,
    "state": {
      "active": true,
      "timestamp": "2015-05-26T18:21:08.630Z"
    },
    "actions": {
      "test_index": {
        "ack": {
          "timestamp": "2015-05-26T18:21:08.630Z",
          "state": "awaits_successful_execution"
        }
      }
    }
  },
  "watch": {
    "input": {
      "simple": {
        "payload": {
          "send": "yes"
        }
      }
    },
    "condition": {
      "always": {}
    },
    "trigger": {
      "schedule": {
        "hourly": {
          "minute": [0, 5]
        }
      }
    },
    "actions": {
      "test_index": {
        "index": {
          "index": "test"
        }
      }
    }
  }
}
```

