--
:api: ccr-put-follow
:request: PutFollowRequest
:response: PutFollowResponse
--
[role="xpack"]
[id="{upid}-{api}"]
=== Create follower API


[id="{upid}-{api}-request"]
==== Request

Creates a follower index and makes that index follow a leader index.

["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request]
--------------------------------------------------
<1> The name of the remote cluster alias.
<2> The name of the leader in the remote cluster.
<3> The name of the follower index to create.
<4> The number of shard copies that must be active before the call returns.
<5> The settings overrides for the follower index.

[id="{upid}-{api}-response"]
==== Response

The +{response}+ indicates if the request was received.

["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-response]
--------------------------------------------------
<1> Whether the follower index was created.
<2> Whether the follower shards are started.
<3> Whether the follower index started following the leader index.

include::../execution.asciidoc[]
