put-pipeline.asciidoc 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. [[put-pipeline-api]]
  2. === Put Pipeline API
  3. The put pipeline API adds pipelines and updates existing pipelines in the cluster.
  4. [source,console]
  5. --------------------------------------------------
  6. PUT _ingest/pipeline/my-pipeline-id
  7. {
  8. "description" : "describe pipeline",
  9. "processors" : [
  10. {
  11. "set" : {
  12. "field": "foo",
  13. "value": "bar"
  14. }
  15. }
  16. ]
  17. }
  18. --------------------------------------------------
  19. [float]
  20. [[versioning-pipelines]]
  21. ==== Pipeline versioning
  22. Pipelines can optionally add a `version` number, which can be any integer value,
  23. in order to simplify pipeline management by external systems. The `version`
  24. field is completely optional and it is meant solely for external management of
  25. pipelines.
  26. [source,console]
  27. --------------------------------------------------
  28. PUT /_ingest/pipeline/my-pipeline-id
  29. {
  30. "description" : "describe pipeline",
  31. "version" : 123,
  32. "processors" : [
  33. {
  34. "set" : {
  35. "field": "foo",
  36. "value": "bar"
  37. }
  38. }
  39. ]
  40. }
  41. --------------------------------------------------
  42. To unset a `version`, simply replace the pipeline without specifying
  43. one.
  44. [source,console]
  45. --------------------------------------------------
  46. PUT /_ingest/pipeline/my-pipeline-id
  47. {
  48. "description" : "describe pipeline",
  49. "processors" : [
  50. {
  51. "set" : {
  52. "field": "foo",
  53. "value": "bar"
  54. }
  55. }
  56. ]
  57. }
  58. --------------------------------------------------
  59. //////////////////////////
  60. [source,console]
  61. --------------------------------------------------
  62. DELETE /_ingest/pipeline/my-pipeline-id
  63. --------------------------------------------------
  64. // TEST[continued]
  65. [source,console-result]
  66. --------------------------------------------------
  67. {
  68. "acknowledged": true
  69. }
  70. --------------------------------------------------
  71. //////////////////////////
  72. NOTE: The put pipeline API also instructs all ingest nodes to reload their in-memory representation of pipelines, so that
  73. pipeline changes take effect immediately.