List UniqKeys
Interface Overview
Gets a list of unique keys for database tables so that the unique key is set as the primary key when creating a task
Interface Address
/cloudcanal/console/api/v1/openapi/datasource/listuniqs
Request Manner
POST
Request Parameters
| ParameterName | Parameter Description | RequestType | Whether Required | DataType |
|---|---|---|---|---|
| clusterId | Cluster ID of the machine set that attempts to connect to the data source | Body | True | Long |
| dataSourceId | ID of the target data source | Body | True | Long |
| hostType | Selected data source network type PRIVATE (intranet) PUBLIC (internet) | Body | True | String |
| dbName | Database name; for MySQL, please fill in the "schemas" parameter | Body | False | String |
| schemas | List of schema names, including MySQL dbname, PostgreSQL schema, and Oracle schema | Body | True | List |
Public response result
| ParameterName | Parameter Description | Type(Java) | NotNull |
|---|---|---|---|
| code | 1: success, 0: failure | String | True |
| data | Object | False | |
| msg | String | False | |
| requestId | String | True |