Ingest Pipelines

class elasticsearch.client.IngestClient(client)
Parameters:

client (BaseClient)

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

Deletes a geoip database configuration.

https://www.elastic.co/guide/en/elasticsearch/reference/8.16/delete-geoip-database-api.html

Parameters:
  • id (str | Sequence[str]) – A comma-separated list of geoip database configurations to delete

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

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

Deletes one or more existing ingest pipeline.

https://www.elastic.co/guide/en/elasticsearch/reference/8.16/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 (str | Literal[-1] | ~typing.Literal[0] | 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 (str | Literal[-1] | ~typing.Literal[0] | 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)

Gets download statistics for GeoIP2 databases used with the geoip processor.

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

Parameters:
Return type:

ObjectApiResponse[Any]

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

Returns information about one or more geoip database configurations.

https://www.elastic.co/guide/en/elasticsearch/reference/8.16/get-geoip-database-api.html

Parameters:
  • id (str | Sequence[str] | None) – Comma-separated list of database configuration IDs to retrieve. Wildcard (*) expressions are supported. To get all database configurations, omit this parameter or use *.

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

  • error_trace (bool | None)

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

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

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

Returns information about one or more ingest pipelines. This API returns a local reference of the pipeline.

https://www.elastic.co/guide/en/elasticsearch/reference/8.16/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 (str | Literal[-1] | ~typing.Literal[0] | 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)

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.

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

Parameters:
Return type:

ObjectApiResponse[Any]

put_geoip_database(*, id, maxmind=None, name=None, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None, timeout=None, body=None)

Returns information about one or more geoip database configurations.

https://www.elastic.co/guide/en/elasticsearch/reference/8.16/put-geoip-database-api.html

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

  • maxmind (Mapping[str, Any] | None) – The configuration necessary to identify which IP geolocation provider to use to download the database, as well as any provider-specific configuration necessary for such downloading. At present, the only supported provider is maxmind, and the maxmind provider requires that an account_id (string) is configured.

  • name (str | None) – The provider-assigned name of the IP geolocation database to download.

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

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

Return type:

ObjectApiResponse[Any]

put_pipeline(*, id, deprecated=None, 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 an ingest pipeline. Changes made using this API take effect immediately.

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

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

  • deprecated (bool | None) – 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.

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

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

  • master_timeout (str | Literal[-1] | ~typing.Literal[0] | 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 (str | Literal[-1] | ~typing.Literal[0] | 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(*, docs=None, id=None, error_trace=None, filter_path=None, human=None, pipeline=None, pretty=None, verbose=None, body=None)

Executes an ingest pipeline against a set of provided documents.

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

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

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

  • 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]