get-auto-follow-pattern.asciidoc 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[ccr-get-auto-follow-pattern]]
  4. === Get Auto-Follow Pattern API
  5. ++++
  6. <titleabbrev>Get Auto-Follow Pattern</titleabbrev>
  7. ++++
  8. beta[]
  9. Get auto-follow patterns.
  10. ==== Description
  11. This API gets configured auto-follow patterns. This API will return the
  12. specified auto-follow pattern collection.
  13. ==== Request
  14. //////////////////////////
  15. [source,js]
  16. --------------------------------------------------
  17. PUT /_ccr/auto_follow/my_auto_follow_pattern
  18. {
  19. "remote_cluster" : "remote_cluster",
  20. "leader_index_patterns" :
  21. [
  22. "leader_index*"
  23. ],
  24. "follow_index_pattern" : "{{leader_index}}-follower"
  25. }
  26. --------------------------------------------------
  27. // CONSOLE
  28. // TEST[setup:remote_cluster]
  29. // TESTSETUP
  30. [source,js]
  31. --------------------------------------------------
  32. DELETE /_ccr/auto_follow/my_auto_follow_pattern
  33. --------------------------------------------------
  34. // CONSOLE
  35. // TEST
  36. // TEARDOWN
  37. //////////////////////////
  38. [source,js]
  39. --------------------------------------------------
  40. GET /_ccr/auto_follow/
  41. --------------------------------------------------
  42. // CONSOLE
  43. [source,js]
  44. --------------------------------------------------
  45. GET /_ccr/auto_follow/<auto_follow_pattern_name>
  46. --------------------------------------------------
  47. // CONSOLE
  48. // TEST[s/<auto_follow_pattern_name>/my_auto_follow_pattern/]
  49. ==== Path Parameters
  50. `auto_follow_pattern_name`::
  51. (string) specifies the auto-follow pattern collection that you want to
  52. retrieve; if you do not specify a name, the API returns information for all
  53. collections
  54. ==== Example
  55. This example retrieves information about an auto-follow pattern collection
  56. named `my_auto_follow_pattern`:
  57. [source,js]
  58. --------------------------------------------------
  59. GET /_ccr/auto_follow/my_auto_follow_pattern
  60. --------------------------------------------------
  61. // CONSOLE
  62. // TEST[setup:remote_cluster]
  63. The API returns the following result:
  64. [source,js]
  65. --------------------------------------------------
  66. {
  67. "my_auto_follow_pattern" :
  68. {
  69. "remote_cluster" : "remote_cluster",
  70. "leader_index_patterns" :
  71. [
  72. "leader_index*"
  73. ],
  74. "follow_index_pattern" : "{{leader_index}}-follower"
  75. }
  76. }
  77. --------------------------------------------------
  78. // TESTRESPONSE