文档

ListDataSource - 查询数据源列表

更新时间:

本接口用于查询已创建数据源的列表。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
SearchKeystring

数据源的名称或 ID。

sourcename
Typesarray

数据源类型的集合。

string

数据源的类型。

MYSQL_PUBLIC
SortFieldstring

数据源排序的字段,包括 gmtCreate(默认值)和 gmtModified。

gmtCreate
Orderstring

数据源排序的顺序,包括 asc(升序)和 descend(降序)。

descend
PageNumberstring

页序号,分页查询时生效。

1
PageSizestring

页大小,分页查询时生效。

10

返回参数

名称类型描述示例值
object

返回结果。

Successboolean

是否调用成功。

true
ErrorDetailobject

错误详情。

Codestring

错误码(新)。

CM-RESOAT1111
Levelstring

包括 FATAL、ERROR、WARNING 和 CRITICAL。

ERROR
Messagestring

错误描述(新)。

A system error occurred.
ExtraContextobject

用于填充 Message 中的占位符。

any

用于填充 Message 中的占位符。

null
MessageMcmsKeystring

错误信息的 Key。

null
MessageMcmsContextobject

用于填充 MessageMcmsKey 中的占位符。

string

用于填充 MessageMcmsKey 中的占位符。

null
Reasonstring

错误原因。

null
ReasonMcmsKeystring

错误原因的 Key。

null
ReasonMcmsContextobject

错误原因的上下文。

string

错误原因的上下文。

null
Proposalstring

建议(新)。

null
ProposalMcmsKeystring

建议内容的 Key。

null
ProposalMcmsContextobject

建议内容的上下文。

string

建议内容的上下文。

null
UpstreamErrorDetailany

上游错误详情,用于处理 HTTP 请求。

null
Codestring

错误码(旧)。

INNER_ERROR
Messagestring

错误描述(旧)。

A system error occurred.
Advicestring

建议(旧)。

Contact the administrator.
RequestIdstring

请求 ID。

EE205C00-30E4-XXXX-XXXX-87E3A8A2AA0C
PageNumberinteger

页序号,分页查询时生效。

1
PageSizeinteger

页大小,分页查询时生效。

10
TotalCountlong

总数,分页查询时生效。

132
Coststring

请求耗时,单位为秒。

28
Dataobject []

数据源列表的相关信息。

Idstring

数据源终端标识。

e_4w****v
Namestring

数据源的名称。

RATION***1DBUTF11
Typestring

数据源的类型。

MYSQL_PUBLIC
Rolestring

数据源的角色,包括 MASTERSLAVE

MASTER
Ownerstring

数据源的 Owner。

admin
Tenantstring

数据库租户的名称或 ID。

tenant_name
Clusterstring

数据库租户所在集群的名称或 ID。

cluster_name
Schemastring

数据库的名称。填写后,仅对该数据库进行数据迁移或数据同步。

schema_name
VpcIdstring

用户申请公有云 VPC 的唯一 ID。

vpc_t4***
Ipstring

数据库宿主机的 IP 地址。

xxx.xxx.xxx.1
Portinteger

数据库宿主机 IP 的端口号。

2883
UserNamestring

用于数据迁移或数据同步的数据库用户的名称。

user_name
Regionstring

数据源所属的地域。

cn-beijing
Descriptionstring

数据源的备注信息,不能超过 128 个字符。

test
OracleSidstring

Oracle 数据库的 SID。

null
OracleNlsLengthSemanticsstring

nls_length_semantics 属性,仅针对 Oracle 和 OceanBase 数据库 Oracle 租户数据源。

null
OperatingSystemstring

操作系统。OceanBase 数据源没有该参数。

Linux
Versionstring

版本。

4.1.0
Timezonestring

时区。

+08:00
Charsetstring

字符编码。

utf8mb4
ResourceOwnerstring

资源所有者。

178641****05809
GmtCreatestring

数据源的创建时间,以 UTC + 0 时区的时间格式展示。

2023-07-13T20:27:28.000+00:00
GmtModifiedstring

数据源的修改时间,以 UTC + 0 时区的时间格式展示。

2023-07-13T20:37:28.000+00:00
PartnerIdstring

对应主备库的 ID。

null
ConnExtraAttributesany

连接额外属性。具体返回字段请参见《附录》模块的内容。

null

附录

Kafka

{
    "connExtraAttributes":{
        "endpoint":"xxx.xxx.xxx.1:2883",
        "username":null,
        "enableSSL":null,
        "enableSASL":null,
        "saslMechanism":null,
        "disableIdentificationAlgorithm":false
    }
}
参数类型描述
endpointstring服务地址。
usernamestring用户名。当您选择认证方式为 PLAIN、SCRAM-SHA-256 和 SCRAM-SHA-512 时,该参数必填。
enableSSLboolean是否开启 SSL 认证。如果开启,则需要上传授信证书。
enableSASLboolean是否开启 SASL 认证。
saslMechanismKafkaSaslMechanisnEnum加密方式,包括 PLAIN、SCRAM-SHA-256、SCRAM-SHA-512 和 KERBEROS。
disableIdentificationAlgorithmbooleanSSL 加密时,是否开启主机名验证。

DataHub

{
    "connExtraAttributes":{
        "endpoint":"xxx.xxx.xxx.1:2883",
        "project":"detx***"
    }
}
参数类型描述
endpointstring服务地址。
projectstring项目的名称。

RocketMQ

{
    "connExtraAttributes":{
        "endpoint":"xxx.xxx.xxx.1:2883",
        "endpointType":null,
        "version":null
    }
}
参数类型描述
endpointstring服务地址。
endpointTypeCloudRocketMQEndpoint.Type服务地址的类型。
versionCloudRocketMQInst.VersionRocketMQ 的版本。

OceanBase

{
    "connExtraAttributes":{
        "cluster":"xgez***",
        "tenant":"gexr**",
        "isLogicSource":false,
        "useLogProxy":true,
        "drcUser":"tes***",
        "configUrl":"http://xxx.xxx.xxx.1:2883/service****",
        "logProxyIp":"xxx.xxx.xxx.2",
        "logProxyPort":2883,
        "noUserAuth":false
    }
}
参数类型描述
clusterstring集群的名称。
tenantstring租户的名称。
isLogicSourceboolean是否为逻辑数据源。
useLogProxyboolean是否使用 LogProxy。
drcUserstringdrc_user 的配置。
configUrlstring用于获取 OceanBase 数据库底层服务器的真实地址。
logProxyIpstringLogProxy 服务的 IP 地址。
logProxyPortintegerLogProxy 服务的端口。
noUserAuthboolean对于同步 DataWorks 的接口,数据源是 OMS 自动生成的。如果没有用户账号和密码,则不能连接用户的 OceanBase 数据库。

TiDB

{
    "connExtraAttributes":{
        "kafkaId":"e_edz****",
        "kafkaTopic":"test**",
        "kafkaName":"denz***"
    }
}
参数类型描述
kafkaIdstring绑定的 Kafka 数据源的 ID。
kafkaTopicstring绑定的 Kafka Topic 的名称。
kafkaNamestring绑定的 Kafka 数据源的名称。

示例

正常返回示例

JSON格式

{
  "Success": true,
  "ErrorDetail": {
    "Code": "CM-RESOAT1111",
    "Level": "ERROR",
    "Message": "A system error occurred.",
    "ExtraContext": {
      "key": "null"
    },
    "MessageMcmsKey": "null",
    "MessageMcmsContext": {
      "key": "null"
    },
    "Reason": "null",
    "ReasonMcmsKey": "null",
    "ReasonMcmsContext": {
      "key": "null"
    },
    "Proposal": "null",
    "ProposalMcmsKey": "null",
    "ProposalMcmsContext": {
      "key": "null"
    },
    "UpstreamErrorDetail": "null"
  },
  "Code": "INNER_ERROR",
  "Message": "A system error occurred.",
  "Advice": "Contact the administrator. ",
  "RequestId": "EE205C00-30E4-XXXX-XXXX-87E3A8A2AA0C",
  "PageNumber": 1,
  "PageSize": 10,
  "TotalCount": 132,
  "Cost": "28",
  "Data": [
    {
      "Id": "e_4w****v",
      "Name": "RATION***1DBUTF11",
      "Type": "MYSQL_PUBLIC",
      "Role": "MASTER",
      "Owner": "admin",
      "Tenant": "tenant_name",
      "Cluster": "cluster_name",
      "Schema": "schema_name",
      "VpcId": "vpc_t4***",
      "Ip": "xxx.xxx.xxx.1",
      "Port": 2883,
      "UserName": "user_name",
      "Region": "cn-beijing",
      "Description": "test",
      "OracleSid": "null",
      "OracleNlsLengthSemantics": "null",
      "OperatingSystem": "Linux",
      "Version": "4.1.0",
      "Timezone": "+08:00",
      "Charset": "utf8mb4",
      "ResourceOwner": "178641****05809",
      "GmtCreate": "2023-07-13T20:27:28.000+00:00",
      "GmtModified": "2023-07-13T20:37:28.000+00:00",
      "PartnerId": "null",
      "ConnExtraAttributes": "null"
    }
  ]
}

错误码

访问错误中心查看更多错误码。

  • 本页导读 (0)
文档反馈