Skip to main content

List 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/listds

Request Manner

POST

Request Parameters

ParameterNameParameter DescriptionRequestTypeWhether RequiredDataType
dataSourceIdData source IDBodyFalseLong
deployTypeData source deployment type

SELF_MAINTENANCE (self-built)
ALIBABA_CLOUD_HOSTED (Alibaba Cloud hosted)
BodyFalseString
hostTypeData source default network type

PRIVATE (intranet)
PUBLIC (internet)
BodyFalseString
lifeCycleStateData source status

CREATING (creating)
CREATED (created)
DELETING (deleting)
DELETED (deleted)
LOCKED (locked)
BodyFalseString
typeData source type

MySQL
PolarDbMySQL
PolarDbX
PostgreSQL
Greenplum
Oracle
SQLServer
Redis
MongoDB
Kafka
RocketMQ
RabbitMQ
Hive
ElasticSearch
DRDS
AdbForMySQL
TiDB
ClickHouse
Kudu
BodyFalseString

Public response result

ParameterNameParameter DescriptionType(Java)NotNull
code1: Success 0: FailureStringTrue
data-ObjectFalse
msg-StringFalse
requestId-StringTrue

Data Parameter

data is an array where the fields in each set of data are described as follows:

ParameterNameParameter DescriptionType(Java)NotNull
idPrimary keyLongTrue
gmtCreateCreation timeStringTrue
gmtModifiedModification timeStringTrue
uidData source owner UIDStringTrue
ownerData source ownerStringTrue
deployTypeData source deployment type

SELF_MAINTENANCE (self-built)
ALIBABA_CLOUD_HOSTED (Alibaba Cloud hosted)
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
privateHostIntranet hostStringFalse
publicHostInternet hostStringFalse
hostTypeData source default network type

PRIVATE (intranet)
PUBLIC (internet)
StringTrue
instanceDescData source descriptionStringFalse
versionData source versionStringFalse
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 (successful)
FAILED (failed)
CANCELED (canceled)
SKIP (ignored)
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": "ca5fa39b-2b56-11ec-8c7e-27997c09a959",
"code": "1",
"msg": "request success",
"data": [
{
"id": 15,
"gmtCreate": "2021-05-07T10:11:47.000+0000",
"gmtModified": "2021-06-07T09:50:28.000+0000",
"uid": "4503980488230169",
"owner": "liqiang",
"deployType": "SELF_MAINTENANCE",
"region": "customer",
"dataSourceType": "PostgreSQL",
"privateHost": "192.168.0.152:50402",
"publicHost": "",
"hostType": "PRIVATE",
"instanceDesc": "12.4",
"version": "12.4 (Debian 12.4-1.pgdg100+1)",
"instanceId": "pg-3fjo4n2tmli9cfk",
"schemaJson": null,
"consoleJobId": 0,
"consoleTaskState": null,
"accountName": "postgres",
"lifeCycleState": "CREATED",
"securityType": "USER_PASSWD"
},
{
"id": 1,
"gmtCreate": "2021-03-26T04:07:23.000+0000",
"gmtModified": "2021-09-14T11:11:39.000+0000",
"uid": "4503980488230169",
"owner": "liqiang",
"deployType": "SELF_MAINTENANCE",
"region": "customer",
"dataSourceType": "MySQL",
"privateHost": "127.0.0.1:4306",
"publicHost": "",
"hostType": "PRIVATE",
"instanceDesc": "local target",
"version": "5.7.27-log",
"instanceId": "my-dc1l0m2cfdtrrhq",
"schemaJson": null,
"consoleJobId": 0,
"consoleTaskState": null,
"accountName": "root",
"lifeCycleState": "CREATED",
"securityType": "USER_PASSWD"
}
]
}