// This file is autogenerated, DO NOT EDIT
// ingest/apis/simulate-ingest.asciidoc:435

[source, python]
----
resp = client.simulate.ingest(
    docs=[
        {
            "_index": "my-index",
            "_id": "123",
            "_source": {
                "foo": "foo"
            }
        },
        {
            "_index": "my-index",
            "_id": "456",
            "_source": {
                "bar": "rab"
            }
        }
    ],
    component_template_substitutions={
        "my-mappings_template": {
            "template": {
                "mappings": {
                    "dynamic": "strict",
                    "properties": {
                        "foo": {
                            "type": "keyword"
                        },
                        "bar": {
                            "type": "keyword"
                        }
                    }
                }
            }
        }
    },
)
print(resp)
----
