get-auto-follow-pattern.asciidoc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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 {stack-ov}/ccr-auto-follow.html[auto-follow patterns].
  12. This API will return the 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. ==== Authorization
  55. If the {es} {security-features} are enabled, you must have `manage_ccr` cluster
  56. privileges on the cluster that contains the follower index. For more information,
  57. see {stack-ov}/security-privileges.html[Security privileges].
  58. ==== Example
  59. This example retrieves information about an auto-follow pattern collection
  60. named `my_auto_follow_pattern`:
  61. [source,js]
  62. --------------------------------------------------
  63. GET /_ccr/auto_follow/my_auto_follow_pattern
  64. --------------------------------------------------
  65. // CONSOLE
  66. // TEST[setup:remote_cluster]
  67. The API returns the following result:
  68. [source,js]
  69. --------------------------------------------------
  70. {
  71. "patterns": [
  72. {
  73. "name": "my_auto_follow_pattern",
  74. "pattern": {
  75. "remote_cluster" : "remote_cluster",
  76. "leader_index_patterns" :
  77. [
  78. "leader_index*"
  79. ],
  80. "follow_index_pattern" : "{{leader_index}}-follower"
  81. }
  82. }
  83. ]
  84. }
  85. --------------------------------------------------
  86. // TESTRESPONSE