123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- [role="xpack"]
- [[ccr-get-auto-follow-pattern]]
- === Get auto-follow pattern API
- ++++
- <titleabbrev>Get auto-follow pattern</titleabbrev>
- ++++
- .New API reference
- [sidebar]
- --
- For the most up-to-date API details, refer to {api-es}/group/endpoint-ccr[Cross-cluster replication APIs].
- --
- Get {ccr} <<ccr-auto-follow,auto-follow patterns>>.
- [[ccr-get-auto-follow-pattern-request]]
- ==== {api-request-title}
- //////////////////////////
- [source,console]
- --------------------------------------------------
- PUT /_ccr/auto_follow/my_auto_follow_pattern
- {
- "remote_cluster" : "remote_cluster",
- "leader_index_patterns" :
- [
- "leader_index*"
- ],
- "leader_index_exclusion_patterns":
- [
- "leader_index_001"
- ],
- "follow_index_pattern" : "{{leader_index}}-follower"
- }
- --------------------------------------------------
- // TEST[setup:remote_cluster]
- // TESTSETUP
- [source,console]
- --------------------------------------------------
- DELETE /_ccr/auto_follow/my_auto_follow_pattern
- --------------------------------------------------
- // TEST
- // TEARDOWN
- //////////////////////////
- [source,console]
- --------------------------------------------------
- GET /_ccr/auto_follow/
- --------------------------------------------------
- [source,console]
- --------------------------------------------------
- GET /_ccr/auto_follow/<auto_follow_pattern_name>
- --------------------------------------------------
- // TEST[s/<auto_follow_pattern_name>/my_auto_follow_pattern/]
- [[ccr-get-auto-follow-pattern-prereqs]]
- ==== {api-prereq-title}
- * If the {es} {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>>.
- [[ccr-get-auto-follow-pattern-desc]]
- ==== {api-description-title}
- This API gets configured <<ccr-auto-follow,auto-follow patterns>>.
- This API will return the specified auto-follow pattern collection.
- [[ccr-get-auto-follow-pattern-path-parms]]
- ==== {api-path-parms-title}
- `<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.
- [[ccr-get-auto-follow-pattern-query-params]]
- ==== {api-query-parms-title}
- include::{es-ref-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
- [[ccr-get-auto-follow-pattern-examples]]
- ==== {api-examples-title}
- This example retrieves information about an auto-follow pattern collection
- named `my_auto_follow_pattern`:
- [source,console]
- --------------------------------------------------
- GET /_ccr/auto_follow/my_auto_follow_pattern
- --------------------------------------------------
- // TEST[setup:remote_cluster]
- The API returns the following result:
- [source,console-result]
- --------------------------------------------------
- {
- "patterns": [
- {
- "name": "my_auto_follow_pattern",
- "pattern": {
- "active": true,
- "remote_cluster" : "remote_cluster",
- "leader_index_patterns" :
- [
- "leader_index*"
- ],
- "leader_index_exclusion_patterns":
- [
- "leader_index_001"
- ],
- "follow_index_pattern" : "{{leader_index}}-follower"
- }
- }
- ]
- }
- --------------------------------------------------
|