Querying Data Synchronization Configurations
Function
This API is used to query data synchronization configuration. Before calling this API:
- Learn how to authorize and authenticate it.
- Obtain the required region and endpoint.
URI
GET /v3/{project_id}/instances/{instance_id}/clickhouse/replication/config
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. |
instance_id |
Yes |
String |
ClickHouse instance ID, which is compliant with the UUID format. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
database_name |
Yes |
String |
Database name. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. To obtain this value, call the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the token value. |
X-Language |
No |
String |
Request language type. The default value is en-us. Values:
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
source_instance_id |
String |
Source instance ID. |
source_node_id |
String |
Node ID of the source instance. |
database_info |
ChDatabaseConfigResponse object |
Database configuration information. |
table_infos |
Array of ChDatabaseTableConfigCheckResult objects |
Table configurations. |
table_repl_config |
Table synchronization configurations. |
|
is_tables_change |
Boolean |
Whether there is any change to the synchronization scope (tables to be synchronized). |
new_table_repl_config |
Updated table synchronization configurations. |
|
last_error_of_alter_table |
String |
Exception about the latest ALTER TABLE operation. |
Parameter |
Type |
Description |
---|---|---|
database_name |
String |
Source database name. |
db_config_check_results |
Array of ChDatabaseConfigCheckResult objects |
Check result of the source database configurations. |
Parameter |
Type |
Description |
---|---|---|
param_name |
String |
Name of the database synchronization configuration parameter. |
value |
String |
Value of the database synchronization configuration parameter. |
check_result |
String |
Check result. Values:
|
Parameter |
Type |
Description |
---|---|---|
table_name |
String |
Table name. |
table_config |
String |
Table configuration item. The following column operations are allowed: PARTITION BY, COLUMNS, ORDER BY, SAMPLE BY, PRIMARY KEY, and TTL. |
check_result |
String |
Check result. |
Parameter |
Type |
Description |
---|---|---|
repl_type |
String |
Table synchronization type. Values:
|
tables |
Array of strings |
Tables listed on the whitelist or blacklist. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Request
Querying the data synchronization configurations of database db_test
GET https://{localhost}/v3/23a50154cf494ec9ad6883979a12db0a/instances/54e42160670e48e789af7075e1efea1fin16/clickhouse/replication/config?database_name=db_test
Example Response
Status code: 200
Success.
{ "source_instance_id" : "77aa4096cb824a61b93dab5ca00ecc8fin07", "source_node_id" : "57bfeacf6e8d4eb685ea907372374b35no07", "database_info" : { "database_name" : "blackwhite_0018_61474479", "db_config_check_results" : [ { "param_name" : "default_isolation_level", "value" : "QUERY_SNAPSHOT", "check_result" : "success" }, { "param_name" : "enable_snapshots", "value" : "true", "check_result" : "success" }, { "param_name" : "enable_chunk_level", "value" : "true", "check_result" : "success" }, { "param_name" : "max_sync_threads", "value" : "1", "check_result" : "success" }, { "param_name" : "treat_numeric_string_as_integer", "value" : "false", "check_result" : "success" }, { "param_name" : "min_binlog_expire_logs_seconds", "value" : "86400", "check_result" : "success" }, { "param_name" : "max_rows_in_buffer", "value" : "2000000", "check_result" : "success" }, { "param_name" : "max_rows_in_buffers", "value" : "6000000", "check_result" : "success" }, { "param_name" : "max_bytes_in_buffer", "value" : "200000000", "check_result" : "success" }, { "param_name" : "max_bytes_in_buffers", "value" : "600000000", "check_result" : "success" }, { "param_name" : "max_flush_data_time", "value" : "5000", "check_result" : "success" } ] }, "table_infos" : [ ], "table_repl_config" : { "repl_type" : "black_list", "tables" : [ ] }, "is_tables_change" : false, "new_table_repl_config" : { "repl_type" : null, "tables" : null }, "last_error_of_alter_table" : null }
Status Code
Status Code |
Description |
---|---|
200 |
Success. |
400 |
Client error. |
500 |
Server error. |
Error Code
For details, see Error Codes.
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