get-pipeline.asciidoc 2.2 KB

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