Get auto-follow pattern API

Get auto-follow patterns.

Request

  1. GET /_ccr/auto_follow/
  1. GET /_ccr/auto_follow/<auto_follow_pattern_name>

Prerequisites

  • If the Elasticsearch security features are enabled, you must have manage_ccr cluster privileges on the cluster that contains the follower index. For more information, see Security privileges.

Description

This API gets configured auto-follow patterns. This API will return the specified auto-follow pattern collection.

Path parameters

<auto_follow_pattern_name>

(Optional, string) Specifies the auto-follow pattern collection that you want to retrieve. If you do not specify a name, the API returns information for all collections.

Examples

This example retrieves information about an auto-follow pattern collection named my_auto_follow_pattern:

  1. GET /_ccr/auto_follow/my_auto_follow_pattern

The API returns the following result:

  1. {
  2. "patterns": [
  3. {
  4. "name": "my_auto_follow_pattern",
  5. "pattern": {
  6. "active": true,
  7. "remote_cluster" : "remote_cluster",
  8. "leader_index_patterns" :
  9. [
  10. "leader_index*"
  11. ],
  12. "follow_index_pattern" : "{{leader_index}}-follower"
  13. }
  14. }
  15. ]
  16. }