Simulate a pipeline

  • POST also GET /_ingest/pipeline/{id}/_simulate
  • POST also GET /_ingest/pipeline/_simulate
Auth

Run an ingest pipeline against a set of provided documents. You can either specify an existing pipeline to use with the provided documents or supply a pipeline definition in the body of the request.

Required privileges

Cluster privileges read_pipeline

Path parameters

id string optional

The pipeline to test. If you don't specify a pipeline in the request body, this parameter is required.

Leave it out to use /_ingest/pipeline/_simulate.

Query parameters

verbose boolean · default: false

If true, the response includes output data for each processor in the executed pipeline.

Request body

docs object[] required

Sample documents to test in the pipeline.

_id string

Unique identifier for the document. This ID must be unique within the _index.

_index string

Name of the index containing the document.

_source object required

JSON body for the document.

pipeline object

The pipeline to test. If you don't specify the pipeline request path parameter, this parameter is required. If you specify both this and the request path parameter, the API only uses the request path parameter.

description string

Description of the ingest pipeline.

on_failure {} Processor[]

Processors to run immediately after a processor failure.

processors {} Processor[]

Processors used to perform transformations on documents before indexing. Processors run sequentially in the order specified.

version number

Version number used by external systems to track ingest pipelines.

deprecated boolean · default: false

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.

_meta object

Arbitrary metadata about the ingest pipeline. This map is not automatically generated by Elasticsearch.

created_date union oneOf

Date and time when the pipeline was created. Only returned if the human query parameter is true.

One of: string or number
created_date_millis number

Date and time when the pipeline was created, in milliseconds since the epoch.

modified_date union oneOf

Date and time when the pipeline was last modified. Only returned if the human query parameter is true.

One of: string or number
modified_date_millis number

Date and time when the pipeline was last modified, in milliseconds since the epoch.

field_access_pattern enum · default: classic

Controls how processors in this pipeline should read and write data on a document's source.

Values: classic flexible

Response

application/json
docs object[] required
doc object
_id string required

Unique identifier for the document. This ID must be unique within the _index.

_index string required

Name of the index containing the document.

_ingest object required
_redact object
_is_redacted boolean required

indicates if document has been redacted

timestamp union oneOf required
One of: string or number
pipeline string
_routing string

Value used to send the document to a specific primary shard.

_source map string to object required

JSON body for the document.

_version union oneOf
One of: number or string
_version_type enum

Supported values include:

  • internal: Use internal versioning that starts at 1 and increments with each update or delete.
  • external: Only index the document if the specified version is strictly higher than the version of the stored document or if there is no existing document.
  • external_gte: Only index the document if the specified version is equal or higher than the version of the stored document or if there is no existing document. NOTE: The external_gte version type is meant for special use cases and should be used with care. If used incorrectly, it can result in loss of data.
Values: internal external external_gte
error object
type string required

The type of error

reason union string nullable

A human-readable explanation of the error, in English.

One of: string
stack_trace string

The server stack trace. Present only if the error_trace=true parameter was sent with the request.

caused_by object
Same fields as error in docs
root_cause object[]
Same fields as error in docs
suppressed object[]
Same fields as error in docs
processor_results object[]
doc object
Same fields as doc in docs
tag string
processor_type string
status enum
Values: success error error_ignored skipped dropped
description string
ignored_error object
type string required

The type of error

reason union string nullable

A human-readable explanation of the error, in English.

One of: string
stack_trace string

The server stack trace. Present only if the error_trace=true parameter was sent with the request.

caused_by object
Same fields as ignored_error in processor_results
root_cause object[]
Same fields as ignored_error in processor_results
suppressed object[]
Same fields as ignored_error in processor_results
error object
type string required

The type of error

reason union string nullable

A human-readable explanation of the error, in English.

One of: string
stack_trace string

The server stack trace. Present only if the error_trace=true parameter was sent with the request.

caused_by object
Same fields as error in processor_results
root_cause object[]
Same fields as error in processor_results
suppressed object[]
Same fields as error in processor_results