get-auto-follow-pattern.asciidoc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. Get auto-follow patterns.
  9. ==== Description
  10. This API gets configured {stack-ov}/ccr-auto-follow.html[auto-follow patterns].
  11. This API will return the specified auto-follow pattern collection.
  12. ==== Request
  13. //////////////////////////
  14. [source,js]
  15. --------------------------------------------------
  16. PUT /_ccr/auto_follow/my_auto_follow_pattern
  17. {
  18. "remote_cluster" : "remote_cluster",
  19. "leader_index_patterns" :
  20. [
  21. "leader_index*"
  22. ],
  23. "follow_index_pattern" : "{{leader_index}}-follower"
  24. }
  25. --------------------------------------------------
  26. // CONSOLE
  27. // TEST[setup:remote_cluster]
  28. // TESTSETUP
  29. [source,js]
  30. --------------------------------------------------
  31. DELETE /_ccr/auto_follow/my_auto_follow_pattern
  32. --------------------------------------------------
  33. // CONSOLE
  34. // TEST
  35. // TEARDOWN
  36. //////////////////////////
  37. [source,js]
  38. --------------------------------------------------
  39. GET /_ccr/auto_follow/
  40. --------------------------------------------------
  41. // CONSOLE
  42. [source,js]
  43. --------------------------------------------------
  44. GET /_ccr/auto_follow/<auto_follow_pattern_name>
  45. --------------------------------------------------
  46. // CONSOLE
  47. // TEST[s/<auto_follow_pattern_name>/my_auto_follow_pattern/]
  48. ==== Path Parameters
  49. `auto_follow_pattern_name`::
  50. (string) specifies the auto-follow pattern collection that you want to
  51. retrieve; if you do not specify a name, the API returns information for all
  52. collections
  53. ==== Authorization
  54. If the {es} {security-features} are enabled, you must have `manage_ccr` cluster
  55. privileges on the cluster that contains the follower index. For more information,
  56. see {stack-ov}/security-privileges.html[Security privileges].
  57. ==== Example
  58. This example retrieves information about an auto-follow pattern collection
  59. named `my_auto_follow_pattern`:
  60. [source,js]
  61. --------------------------------------------------
  62. GET /_ccr/auto_follow/my_auto_follow_pattern
  63. --------------------------------------------------
  64. // CONSOLE
  65. // TEST[setup:remote_cluster]
  66. The API returns the following result:
  67. [source,js]
  68. --------------------------------------------------
  69. {
  70. "patterns": [
  71. {
  72. "name": "my_auto_follow_pattern",
  73. "pattern": {
  74. "remote_cluster" : "remote_cluster",
  75. "leader_index_patterns" :
  76. [
  77. "leader_index*"
  78. ],
  79. "follow_index_pattern" : "{{leader_index}}-follower"
  80. }
  81. }
  82. ]
  83. }
  84. --------------------------------------------------
  85. // TESTRESPONSE