[source, ruby]
----
response = client.simulate.ingest(
  body: {
    docs: [
      {
        _index: 'my-index',
        _id: 'id',
        _source: {
          foo: 'bar'
        }
      },
      {
        _index: 'my-index',
        _id: 'id',
        _source: {
          foo: 'rab'
        }
      }
    ],
    pipeline_substitutions: {
      "my-pipeline": {
        processors: [
          {
            set: {
              field: 'field3',
              value: 'value3'
            }
          }
        ]
      }
    }
  }
)
puts response
----
