Creating Multiple Elastic Search Ingest Pipelines

I have created multiple ingest pipelines. I can export these pipelines from the dev console with the following command: GET _ingest/pipeline/logs*

I copy this into a .json file, I would like to now import this back into my node or another node(I use Ansible). If I attempt to POST to /_ingest/pipeline/ with the body as the contents of a json file I get this:

{"error": "Incorrect HTTP method for uri [/_ingest/pipeline/] and method [PUT], allowed: [GET]", "status": 405}, "msg": "Status code was 405 and not [200]: HTTP Error 405: Method Not Allowed", "redirected": false, "status": 405, "url": "https://www.servername.com:9200/_ingest/pipeline/", "x_elastic_product": "Elasticsearch"}

Is this possible? Or do I need to iterate through each pipeline and PUT /_ingest/pipeline/{{ key_in_json}}

To create an ingest pipeline you need to pass the pipeline-id in the endpoint as described in the documentation.

So, you will need to use PUT _ingest/pipeline/{{key_in_json}}, also, each json should have just one ingest pipeline.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.