get-pipeline.asciidoc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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-path-params]]
  36. ==== {api-path-parms-title}
  37. `<pipeline>`::
  38. (Optional, string)
  39. Comma-separated list of pipeline IDs to retrieve. Wildcard (`*`) expressions are
  40. supported.
  41. +
  42. To get all ingest pipelines, omit this parameter or use `*`.
  43. [[get-pipeline-api-query-params]]
  44. ==== {api-query-parms-title}
  45. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  46. [[get-pipeline-api-api-example]]
  47. ==== {api-examples-title}
  48. [[get-pipeline-api-specific-ex]]
  49. ===== Get information for a specific ingest pipeline
  50. [source,console]
  51. ----
  52. GET /_ingest/pipeline/my-pipeline-id
  53. ----
  54. // TEST[continued]
  55. The API returns the following response:
  56. [source,console-result]
  57. ----
  58. {
  59. "my-pipeline-id" : {
  60. "description" : "describe pipeline",
  61. "version" : 123,
  62. "processors" : [
  63. {
  64. "set" : {
  65. "field" : "foo",
  66. "value" : "bar"
  67. }
  68. }
  69. ]
  70. }
  71. }
  72. ----
  73. [[get-pipeline-api-version-ex]]
  74. ===== Get the version of an ingest pipeline
  75. When you create or update an ingest pipeline,
  76. you can specify an optional `version` parameter.
  77. The version is useful for managing changes to pipeline
  78. and viewing the current pipeline for an ingest node.
  79. To check the pipeline version,
  80. use the `filter_path` query parameter
  81. to <<common-options-response-filtering, filter the response>>
  82. to only the version.
  83. [source,console]
  84. ----
  85. GET /_ingest/pipeline/my-pipeline-id?filter_path=*.version
  86. ----
  87. // TEST[continued]
  88. The API returns the following response:
  89. [source,console-result]
  90. ----
  91. {
  92. "my-pipeline-id" : {
  93. "version" : 123
  94. }
  95. }
  96. ----
  97. ////
  98. [source,console]
  99. ----
  100. DELETE /_ingest/pipeline/my-pipeline-id
  101. ----
  102. // TEST[continued]
  103. [source,console-result]
  104. ----
  105. {
  106. "acknowledged": true
  107. }
  108. ----
  109. ////