Other Management APIs
- Querying the created patterns.
This API is used to query the pattern list and query a specified pattern by name.
An example request is as follows:
GET auto_sync/pattern GET auto_sync/pattern/{pattern_name}
The following is an example of the response:
{ "patterns" : [ { "name" : "pattern1", "pattern" : { "remote_cluster" : "leader", "remote_index_patterns" : [ "log*" ], "local_index_pattern" : "{{remote_index}}-sync", "settings" : { } } } ] }
- Deleting a created schema.
This API is used to delete a specified pattern.
An example request is as follows:
DELETE auto_sync/pattern/{pattern_name}
- Obtaining the automatic synchronization status.
This API is used to obtain the synchronization status of matched indexes.
An example request is as follows:
GET auto_sync/stats
The following is an example of the response:
{ "success_count" : 3, "failed_count" : 0, "failed_remote_cluster_state_requests_count" : 0, "last_fail_exception" : { }, "last_fail_remote_cluster_requests_exception" : { } }
- Obtaining the synchronization status of the index that is being synchronized.
An example request is as follows:
GET {index_name}/sync_stats
The following is an example of the response:
{ "indices" : { "data1_follower" : { "shards" : { "0" : [ { "primary" : false, "total_synced_times" : 27, "total_empty_times" : 25, "total_synced_files" : 4, "total_synced_bytes" : 3580, "total_paused_nanos" : 0, "total_paused_times" : 0, "current" : { "files_count" : 0, "finished_files_count" : 0, "bytes" : 0, "finished_bytes" : 0 } }, { "primary" : true, "total_synced_times" : 28, "total_empty_times" : 26, "total_synced_files" : 20, "total_synced_bytes" : 17547, "total_paused_nanos" : 0, "total_paused_times" : 0, "current" : { "files_count" : 0, "finished_files_count" : 0, "bytes" : 0, "finished_bytes" : 0 } } ] } } } }
- Changing the synchronization period.
The synchronization period is 30 seconds by default and can be modified.
An example request is as follows (change the synchronization period to 2 seconds):
PUT {index_name}/_settings { "index.remote_sync.sync_interval": "2s" }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot