Skip to main content

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

ParameterNameParameter DescriptionRequestTypeWhether RequiredDataType
dataSourceIdID of the data sourceBodyTrueLong

Public response result

ParameterNameParameter DescriptionType(Java)NotNull
code1: success, 0: failureStringTrue
dataObjectFalse
msgStringFalse
requestIdStringTrue

Data Parameter

ParameterNameParameter DescriptionType(Java)NotNull
idPrimary keyLongTrue
gmtCreateCreation timeStringTrue
gmtModifiedModification timeStringTrue
uidUID of the data source ownerStringTrue
ownerData source ownerStringTrue
deployTypeData source deployment type

SELF_MAINTENANCE (self-built)
ALIBABA_CLOUD_HOSTED (Alibaba Cloud)
StringTrue
regionData source region

hangzhou
shanghai
beijing
shenzhen
qingdao
zhangjiakou
huhehaote
hongkong
singapore
silicon_valley
london
mq_internet_access
customer
StringTrue
dataSourceTypeData source type

MySQL
PolarDbMySQL
PolarDbX
PostgreSQL
Greenplum
Oracle
SQLServer
Redis
MongoDB
Kafka
RocketMQ
RabbitMQ
Hive
ElasticSearch
DRDS
AdbForMySQL
TiDB
ClickHouse
Kudu
StringTrue
privateHostPrivate hostStringFalse
publicHostPublic hostStringFalse
hostTypeDefault network type of the data source

PRIVATE (private network)
PUBLIC (public network)
StringTrue
instanceDescDescription of the data sourceStringFalse
versionVersion of the data sourceStringFalse
instanceIdInstance IDStringTrue
schemaJsonLibrary table column structure (JSON), see DataJob related API descriptionStringFalse
consoleJobIdCurrent asynchronous task IDLongFalse
consoleTaskStateCurrent asynchronous task status

WAIT_START (waiting to start)
EXECUTE (executing)
SUCCESS (success)
FAILED (failure)
CANCELED (canceled)
SKIP (skipped)
StringFalse
accountNameAccountStringFalse
lifeCycleStateData source status

CREATING (creating)
CREATED (created)
DELETING (deleting)
DELETED (deleted)
LOCKED (locked)
StringTrue
securityTypeData source security key type

KERBEROS
USER_PASSWD_WITH_TLS
USER_PASSWD
ONLY_USER
ONLY_PASSWD
NONE
StringTrue

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"
}
}