Query DataSources
Interface Overview
Gets a list of data sources so that task creation selects the correct source and target data sources
Interface Address
/cloudcanal/console/api/v1/openapi/datasource/queryds
Request Manner
POST
Request Parameters
ParameterName | Parameter Description | RequestType | Whether Required | DataType |
---|---|---|---|---|
dataSourceId | ID of the data source | Body | True | Long |
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 |
Data Parameter
ParameterName | Parameter Description | Type(Java) | NotNull |
---|---|---|---|
id | Primary key | Long | True |
gmtCreate | Creation time | String | True |
gmtModified | Modification time | String | True |
uid | UID of the data source owner | String | True |
owner | Data source owner | String | True |
deployType | Data source deployment type SELF_MAINTENANCE (self-built) ALIBABA_CLOUD_HOSTED (Alibaba Cloud) | String | True |
region | Data source region hangzhou shanghai beijing shenzhen qingdao zhangjiakou huhehaote hongkong singapore silicon_valley london mq_internet_access customer | String | True |
dataSourceType | Data source type MySQL PolarDbMySQL PolarDbX PostgreSQL Greenplum Oracle SQLServer Redis MongoDB Kafka RocketMQ RabbitMQ Hive ElasticSearch DRDS AdbForMySQL TiDB ClickHouse Kudu | String | True |
privateHost | Private host | String | False |
publicHost | Public host | String | False |
hostType | Default network type of the data source PRIVATE (private network) PUBLIC (public network) | String | True |
instanceDesc | Description of the data source | String | False |
version | Version of the data source | String | False |
instanceId | Instance ID | String | True |
schemaJson | Library table column structure (JSON), see DataJob related API description | String | False |
consoleJobId | Current asynchronous task ID | Long | False |
consoleTaskState | Current asynchronous task status WAIT_START (waiting to start) EXECUTE (executing) SUCCESS (success) FAILED (failure) CANCELED (canceled) SKIP (skipped) | String | False |
accountName | Account | String | False |
lifeCycleState | Data source status CREATING (creating) CREATED (created) DELETING (deleting) DELETED (deleted) LOCKED (locked) | String | True |
securityType | Data source security key type KERBEROS USER_PASSWD_WITH_TLS USER_PASSWD ONLY_USER ONLY_PASSWD NONE | String | True |
Response Example
{
"requestId": "d149a192-2b59-11ec-8c7e-131faed755bd",
"code": "1",
"msg": "request success",
"data": {
"id": 83,
"gmtCreate": "2021-09-22T11:04:47.000+0000",
"gmtModified": "2021-09-22T11:04:47.000+0000",
"uid": "4503980488230169",
"owner": "liqiang",
"deployType": "SELF_MAINTENANCE",
"region": "customer",
"dataSourceType": "RabbitMQ",
"privateHost": "192.168.0.152:5672",
"publicHost": "",
"hostType": "PRIVATE",
"instanceDesc": "152rmq",
"version": null,
"instanceId": "rbq-j657097rx978hrx",
"schemaJson": null,
"consoleJobId": 0,
"consoleTaskState": null,
"accountName": "mqadmin",
"lifeCycleState": "CREATED",
"securityType": "USER_PASSWD"
}
}