put-pipeline.asciidoc 2.1 KB

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