Ingest Client

class opensearchpy.client.ingest.IngestClient(client)[source]

Bases: NamespacedClient

Parameters:

client (Any) –

delete_pipeline(id, params=None, headers=None)[source]

Deletes a pipeline.

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

  • cluster_manager_timeout – Operation timeout for connection to cluster-manager node.

  • error_trace – Whether to include the stack trace of returned errors. Default is false.

  • filter_path – Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with “-“.

  • human – Whether to return human readable values for statistics. Default is True.

  • (Deprecated (master_timeout) – To promote inclusive language, use cluster_manager_timeout instead.): Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.

  • pretty – Whether to pretty format the returned JSON response. Default is false.

  • source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.

  • timeout – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • id

  • params (Any) –

  • headers (Any) –

Return type:

Any

get_pipeline(id=None, params=None, headers=None)[source]

Returns a pipeline.

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

  • cluster_manager_timeout – Operation timeout for connection to cluster-manager node.

  • error_trace – Whether to include the stack trace of returned errors. Default is false.

  • filter_path – Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with “-“.

  • human – Whether to return human readable values for statistics. Default is True.

  • (Deprecated (master_timeout) – To promote inclusive language, use cluster_manager_timeout instead.): Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.

  • pretty – Whether to pretty format the returned JSON response. Default is false.

  • source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.

  • id

  • params (Any) –

  • headers (Any) –

Return type:

Any

processor_grok(params=None, headers=None)[source]

Returns a list of the built-in patterns.

Parameters:
  • error_trace – Whether to include the stack trace of returned errors. Default is false.

  • filter_path – Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with “-“.

  • human – Whether to return human readable values for statistics. Default is True.

  • pretty – Whether to pretty format the returned JSON response. Default is false.

  • s – Sort returned patterns by key name. Default is false.

  • source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.

  • params (Any) –

  • headers (Any) –

Return type:

Any

put_pipeline(id, body, params=None, headers=None)[source]

Creates or updates a pipeline.

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

  • body (Any) – The ingest definition

  • cluster_manager_timeout – Operation timeout for connection to cluster-manager node.

  • error_trace – Whether to include the stack trace of returned errors. Default is false.

  • filter_path – Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with “-“.

  • human – Whether to return human readable values for statistics. Default is True.

  • (Deprecated (master_timeout) – To promote inclusive language, use cluster_manager_timeout instead.): Period to wait for a connection to the cluster-manager node. If no response is received before the timeout expires, the request fails and returns an error.

  • pretty – Whether to pretty format the returned JSON response. Default is false.

  • source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.

  • timeout – Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

  • id

  • body

  • params (Any) –

  • headers (Any) –

Return type:

Any

simulate(body, id=None, params=None, headers=None)[source]

Allows to simulate a pipeline with example documents.

Parameters:
  • body (Any) – The simulate definition

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

  • error_trace – Whether to include the stack trace of returned errors. Default is false.

  • filter_path – Used to reduce the response. This parameter takes a comma-separated list of filters. It supports using wildcards to match any field or part of a field’s name. You can also exclude fields with “-“.

  • human – Whether to return human readable values for statistics. Default is True.

  • pretty – Whether to pretty format the returned JSON response. Default is false.

  • source – The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.

  • verbose – If true, the response includes output data for each processor in the executed pipeline. Default is false.

  • body

  • id

  • params (Any) –

  • headers (Any) –

Return type:

Any