put-pipeline.asciidoc 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. [[put-pipeline-api]]
  2. === Create or update pipeline API
  3. ++++
  4. <titleabbrev>Create or update pipeline</titleabbrev>
  5. ++++
  6. Creates or updates an <<ingest,ingest pipeline>>. Changes made using this API
  7. take effect immediately.
  8. [source,console]
  9. ----
  10. PUT _ingest/pipeline/my-pipeline-id
  11. {
  12. "description" : "describe pipeline",
  13. "processors" : [
  14. {
  15. "set" : {
  16. "field": "foo",
  17. "value": "bar"
  18. }
  19. }
  20. ]
  21. }
  22. ----
  23. [[put-pipeline-api-request]]
  24. ==== {api-request-title}
  25. `PUT /_ingest/pipeline/<pipeline>`
  26. [[put-pipeline-api-prereqs]]
  27. ==== {api-prereq-title}
  28. * If the {es} {security-features} are enabled, you must have the
  29. `manage_pipeline`, `manage_ingest_pipelines`, or `manage`
  30. <<privileges-list-cluster,cluster privilege>> to use this API.
  31. [[put-pipeline-api-path-params]]
  32. ==== {api-path-parms-title}
  33. `<pipeline>`::
  34. (Required, string) ID of the ingest pipeline to create or update.
  35. [[put-pipeline-api-query-params]]
  36. ==== {api-query-parms-title}
  37. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  38. [[put-pipeline-api-request-body]]
  39. ==== {api-request-body-title}
  40. `description`::
  41. (Optional, string)
  42. Description of the ingest pipeline.
  43. `on_failure`::
  44. (Optional, array of <<processors,processor>> objects)
  45. Processors to run immediately after a processor failure.
  46. +
  47. Each processor supports a processor-level `on_failure` value. If a processor
  48. without an `on_failure` value fails, {es} uses this pipeline-level parameter as
  49. a fallback. The processors in this parameter run sequentially in the order
  50. specified. {es} will not attempt to run the pipeline's remaining processors.
  51. `processors`::
  52. (Required, array of <<processors,processor>> objects)
  53. Processors used to preform transformations on documents before indexing.
  54. Processors run sequentially in the order specified.
  55. `version`::
  56. (Optional, integer)
  57. Version number used by external systems to track ingest pipelines.
  58. +
  59. This parameter is intended for external systems only. {es} does not use or
  60. validate pipeline version numbers.