| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 | [[get-pipeline-api]]=== Get Pipeline APIThe get pipeline API returns pipelines based on ID. This API always returns a local reference of the pipeline.//////////////////////////[source,js]--------------------------------------------------PUT _ingest/pipeline/my-pipeline-id{  "description" : "describe pipeline",  "processors" : [    {      "set" : {        "field": "foo",        "value": "bar"      }    }  ]}--------------------------------------------------// CONSOLE//////////////////////////[source,js]--------------------------------------------------GET _ingest/pipeline/my-pipeline-id--------------------------------------------------// CONSOLE// TEST[continued]Example response:[source,js]--------------------------------------------------{  "my-pipeline-id" : {    "description" : "describe pipeline",    "processors" : [      {        "set" : {          "field" : "foo",          "value" : "bar"        }      }    ]  }}--------------------------------------------------// TESTRESPONSEFor each returned pipeline, the source and the version are returned.The version is useful for knowing which version of the pipeline the node has.You can specify multiple IDs to return more than one pipeline. Wildcards are also supported.[float][[versioning-pipelines]]==== Pipeline VersioningPipelines can optionally add a `version` number, which can be any integer value,in order to simplify pipeline management by external systems. The `version`field is completely optional and it is meant solely for external management ofpipelines. To unset a `version`, simply replace the pipeline without specifyingone.[source,js]--------------------------------------------------PUT _ingest/pipeline/my-pipeline-id{  "description" : "describe pipeline",  "version" : 123,  "processors" : [    {      "set" : {        "field": "foo",        "value": "bar"      }    }  ]}--------------------------------------------------// CONSOLETo check for the `version`, you can<<common-options-response-filtering, filter responses>>using `filter_path` to limit the response to just the `version`:[source,js]--------------------------------------------------GET /_ingest/pipeline/my-pipeline-id?filter_path=*.version--------------------------------------------------// CONSOLE// TEST[continued]This should give a small response that makes it both easy and inexpensive to parse:[source,js]--------------------------------------------------{  "my-pipeline-id" : {    "version" : 123  }}--------------------------------------------------// TESTRESPONSE//////////////////////////[source,js]--------------------------------------------------DELETE /_ingest/pipeline/my-pipeline-id--------------------------------------------------// CONSOLE// TEST[continued][source,js]--------------------------------------------------{"acknowledged": true}--------------------------------------------------// TESTRESPONSE//////////////////////////
 |