# Put Pipeline API

原文链接 : [https://www.elastic.co/guide/en/elasticsearch/reference/5.3/put-pipeline-api.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/put-pipeline-api.html)

译文链接 : [http://www.apache.wiki/display/Elasticsearch/Put+Pipeline+API](http://www.apache.wiki/display/Elasticsearch/Put+Pipeline+API)

贡献者 : [那伊抹微笑](/display/~wangyangting)，[ApacheCN](/display/~apachecn)，[Apache中文网](/display/~apachechina)

该 **put** **pipeline** **API** 添加 **pipelines**（管道）并更新集群中现有的 **pipelines**（管道）。

```
curl -XPUT 'localhost:9200/_ingest/pipeline/my-pipeline-id?pretty' -H 'Content-Type: application/json' -d'
{
  "description" : "describe pipeline",
  "processors" : [
    {
      "set" : {
        "field": "foo",
        "value": "bar"
      }
    }
  ]
}
'
```

注意 :

该 **put** **pipeline** **API** 也会命令所有的 **ingest** **nodes** 来重新加载它们内存的 **pipelines**（管道），以便 **pipeline**（管道）更改立即生效。