Ingest Pipelines

class elasticsearch.client.IngestClient(client)
Parameters:

client (BaseClient) –

delete_pipeline(*, id, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, timeout=None)

Deletes a pipeline.

https://www.elastic.co/guide/en/elasticsearch/reference/8.13/delete-pipeline-api.html

Parameters:
  • id (str) – 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 *.

  • master_timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

  • timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • error_trace (bool | None) –

  • filter_path (str | Sequence[str] | None) –

  • human (bool | None) –

  • pretty (bool | None) –

Return type:

ObjectApiResponse[Any]

geo_ip_stats(*, error_trace=None, filter_path=None, human=None, pretty=None)

Returns statistical information about geoip databases

https://www.elastic.co/guide/en/elasticsearch/reference/8.13/geoip-processor.html

Parameters:
Return type:

ObjectApiResponse[Any]

get_pipeline(*, id=None, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, summary=None)

Returns a pipeline.

https://www.elastic.co/guide/en/elasticsearch/reference/8.13/get-pipeline-api.html

Parameters:
  • id (str | None) – Comma-separated list of pipeline IDs to retrieve. Wildcard (*) expressions are supported. To get all ingest pipelines, omit this parameter or use *.

  • master_timeout (Literal[-1] | ~typing.Literal[0] | str | None) – 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.

  • summary (bool | None) – Return pipelines without their definitions (default: false)

  • error_trace (bool | None) –

  • filter_path (str | Sequence[str] | None) –

  • human (bool | None) –

  • pretty (bool | None) –

Return type:

ObjectApiResponse[Any]

processor_grok(*, error_trace=None, filter_path=None, human=None, pretty=None)

Returns a list of the built-in patterns.

https://www.elastic.co/guide/en/elasticsearch/reference/8.13/grok-processor.html

Parameters:
Return type:

ObjectApiResponse[Any]

put_pipeline(*, id, description=None, error_trace=None, filter_path=None, human=None, if_version=None, master_timeout=None, meta=None, on_failure=None, pretty=None, processors=None, timeout=None, version=None, body=None)

Creates or updates a pipeline.

https://www.elastic.co/guide/en/elasticsearch/reference/8.13/ingest.html

Parameters:
  • id (str) – ID of the ingest pipeline to create or update.

  • description (str | None) – Description of the ingest pipeline.

  • if_version (int | None) – Required version for optimistic concurrency control for pipeline updates

  • master_timeout (Literal[-1] | ~typing.Literal[0] | str | None) – 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.

  • meta (Mapping[str, Any] | None) – Optional metadata about the ingest pipeline. May have any contents. This map is not automatically generated by Elasticsearch.

  • on_failure (Sequence[Mapping[str, Any]] | None) – Processors to run immediately after a processor failure. Each processor supports a processor-level on_failure value. If a processor without an on_failure value fails, Elasticsearch uses this pipeline-level parameter as a fallback. The processors in this parameter run sequentially in the order specified. Elasticsearch will not attempt to run the pipeline’s remaining processors.

  • processors (Sequence[Mapping[str, Any]] | None) – Processors used to perform transformations on documents before indexing. Processors run sequentially in the order specified.

  • timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • version (int | None) – 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.

  • error_trace (bool | None) –

  • filter_path (str | Sequence[str] | None) –

  • human (bool | None) –

  • pretty (bool | None) –

  • body (Dict[str, Any] | None) –

Return type:

ObjectApiResponse[Any]

simulate(*, id=None, docs=None, error_trace=None, filter_path=None, human=None, pipeline=None, pretty=None, verbose=None, body=None)

Allows to simulate a pipeline with example documents.

https://www.elastic.co/guide/en/elasticsearch/reference/8.13/simulate-pipeline-api.html

Parameters:
  • id (str | None) – Pipeline to test. If you don’t specify a pipeline in the request body, this parameter is required.

  • docs (Sequence[Mapping[str, Any]] | None) – Sample documents to test in the pipeline.

  • pipeline (Mapping[str, Any] | None) – 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.

  • verbose (bool | None) – If true, the response includes output data for each processor in the executed pipeline.

  • error_trace (bool | None) –

  • filter_path (str | Sequence[str] | None) –

  • human (bool | None) –

  • pretty (bool | None) –

  • body (Dict[str, Any] | None) –

Return type:

ObjectApiResponse[Any]