Creating or updating a replication

Use this API to create or update a replication.

Requirement: OpenSearchServer v1.5.10

Call parameters

URL: /services/rest/index/{index_name}/replication

Method: PUT


  • Content-Type (required): application/json

URL parameters:

  • index_name (required): The name of the index.
  • replication_name (required): The name of the replication.

Raw data (PUT):

Details about the replication sent as JSON. The name will be automatically generated.

  "remoteLogin": "admin",
  "remoteApiKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",

Success response

Replication has been created or updated.

  "successful": true,
  "info": "Item created: http://localhost:8080/geo_repl2"

HTTP code:

Error response

The request failed. The reason is provided in the content.

HTTP code:

Sample call

Using CURL:

curl -XPUT http://localhost:8080/services/rest/index/my_index/replication

Using jQuery:

   type: "PUT",
   dataType: "json",
   url: "http://localhost:8080/services/rest/index/my_index/replication
}).done(function (data) {

View/edit on GitHub

comments powered by Disqus