get-pipeline.asciidoc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. [[get-pipeline-api]]
  2. === Get pipeline API
  3. ++++
  4. <titleabbrev>Get pipeline</titleabbrev>
  5. ++++
  6. Returns information about one or more ingest pipelines.
  7. This API returns a local reference of the pipeline.
  8. ////
  9. [source,console]
  10. ----
  11. PUT /_ingest/pipeline/my-pipeline-id
  12. {
  13. "description" : "describe pipeline",
  14. "version" : 123,
  15. "processors" : [
  16. {
  17. "set" : {
  18. "field": "foo",
  19. "value": "bar"
  20. }
  21. }
  22. ]
  23. }
  24. ----
  25. ////
  26. [source,console]
  27. ----
  28. GET /_ingest/pipeline/my-pipeline-id
  29. ----
  30. // TEST[continued]
  31. [[get-pipeline-api-request]]
  32. ==== {api-request-title}
  33. `GET /_ingest/pipeline/<pipeline>`
  34. `GET /_ingest/pipeline`
  35. [[get-pipeline-api-prereqs]]
  36. ==== {api-prereq-title}
  37. * If the {es} {security-features} are enabled, you must have the
  38. `read_pipeline`, `manage_pipeline`, `manage_ingest_pipelines`, or `manage`
  39. <<privileges-list-cluster,cluster privilege>> to use this API.
  40. [[get-pipeline-api-path-params]]
  41. ==== {api-path-parms-title}
  42. `<pipeline>`::
  43. (Optional, string)
  44. Comma-separated list of pipeline IDs to retrieve. Wildcard (`*`) expressions are
  45. supported.
  46. +
  47. To get all ingest pipelines, omit this parameter or use `*`.
  48. [[get-pipeline-api-query-params]]
  49. ==== {api-query-parms-title}
  50. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  51. [[get-pipeline-api-api-example]]
  52. ==== {api-examples-title}
  53. [[get-pipeline-api-specific-ex]]
  54. ===== Get information for a specific ingest pipeline
  55. [source,console]
  56. ----
  57. GET /_ingest/pipeline/my-pipeline-id
  58. ----
  59. // TEST[continued]
  60. The API returns the following response:
  61. [source,console-result]
  62. ----
  63. {
  64. "my-pipeline-id" : {
  65. "description" : "describe pipeline",
  66. "version" : 123,
  67. "processors" : [
  68. {
  69. "set" : {
  70. "field" : "foo",
  71. "value" : "bar"
  72. }
  73. }
  74. ]
  75. }
  76. }
  77. ----
  78. [[get-pipeline-api-version-ex]]
  79. ===== Get the version of an ingest pipeline
  80. When you create or update an ingest pipeline,
  81. you can specify an optional `version` parameter.
  82. The version is useful for managing changes to pipeline
  83. and viewing the current pipeline for an ingest node.
  84. To check the pipeline version,
  85. use the `filter_path` query parameter
  86. to <<common-options-response-filtering, filter the response>>
  87. to only the version.
  88. [source,console]
  89. ----
  90. GET /_ingest/pipeline/my-pipeline-id?filter_path=*.version
  91. ----
  92. // TEST[continued]
  93. The API returns the following response:
  94. [source,console-result]
  95. ----
  96. {
  97. "my-pipeline-id" : {
  98. "version" : 123
  99. }
  100. }
  101. ----
  102. ////
  103. [source,console]
  104. ----
  105. DELETE /_ingest/pipeline/my-pipeline-id
  106. ----
  107. // TEST[continued]
  108. [source,console-result]
  109. ----
  110. {
  111. "acknowledged": true
  112. }
  113. ----
  114. ////