ListDataSource

更新时间:
复制 MD 格式

Retrieves a list of data sources.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

SearchKey

string

No

The name or ID of the data source.

sourcename

Types

array

No

A collection of data source types.

string

No

The type of the data source.

MYSQL_PUBLIC

SortField

string

No

The field used to sort the data sources. Valid values include gmtCreate (default) and gmtModified.

Valid values:

  • gmtModified :

    gmtModified

  • gmtCreate :

    gmtCreate

gmtCreate

Order

string

No

The sort order for the data sources. Valid values are asc (ascending order) and descend (descending order).

descend

PageNumber

string

No

The page number to return.

1

PageSize

string

No

The number of entries to return per page.

10

Response elements

Element

Type

Description

Example

object

The returned data.

Success

boolean

Indicates whether the request succeeded.

true

ErrorDetail

object

The error details.

Code

string

The error code (new).

CM-RESOAT1111

Level

string

The error level. Valid values: FATAL, ERROR, WARNING, and CRITICAL.

ERROR

Message

string

The error message (new).

A system error occurred.

ExtraContext

object

The context for populating placeholders in the Message field.

any

The value of a context key.

null

MessageMcmsKey

string

The error message key.

null

MessageMcmsContext

object

The context for populating placeholders in the MessageMcmsKey.

string

The value of a context key.

null

Reason

string

The reason for the error.

null

ReasonMcmsKey

string

The key for the error reason.

null

ReasonMcmsContext

object

The context for the error reason.

string

The value of a context key.

null

Proposal

string

The suggestion (new).

null

ProposalMcmsKey

string

The key for the suggestion.

null

ProposalMcmsContext

object

The context for the suggestion.

string

The value of a context key.

null

UpstreamErrorDetail

any

The upstream error details.

null

Code

string

The error code (legacy).

INNER_ERROR

Message

string

The error message (legacy).

A system error occurred.

Advice

string

The suggestion (legacy).

Contact the administrator.

RequestId

string

The request ID.

EE205C00-30E4-XXXX-XXXX-87E3A8A2AA0C

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries per page.

10

TotalCount

integer

The total number of entries that match the query.

132

Cost

string

The request duration, in seconds.

28

Data

array<object>

A list of data source details.

object

Id

string

The ID of the data source.

e_4w****v

Name

string

The name of the data source.

RATION***1DBUTF11

Type

string

The type of the data source.

MYSQL_PUBLIC

Role

string

The data source role. Valid values: MASTER and SLAVE.

MASTER

Owner

string

The owner of the data source.

admin

Tenant

string

The name or ID of the database tenant.

tenant_name

Cluster

string

The name or ID of the cluster where the database tenant resides.

cluster_name

Schema

string

The name of the schema.

schema_name

VpcId

string

The ID of the VPC.

vpc_t4***

Ip

string

The IP address of the database host.

xxx.xxx.xxx.1

Port

integer

The port number of the database host.

2883

UserName

string

The database username.

user_name

Region

string

The data source region.

cn-beijing

Description

string

A description of the data source. The maximum length is 128 characters.

test

OracleSid

string

The Oracle SID.

null

OracleNlsLengthSemantics

string

The nls_length_semantics attribute. This parameter applies only to Oracle data sources and Oracle tenants in OceanBase databases.

null

OperatingSystem

string

The operating system. This parameter is not returned for OceanBase data sources.

Linux

Version

string

The version of the database.

4.1.0

Timezone

string

The time zone of the database.

+08:00

Charset

string

The character set of the database.

utf8mb4

ResourceOwner

string

The resource owner.

178641****05809

GmtCreate

string

The time at which the data source was created, in UTC.

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

GmtModified

string

The time at which the data source was last modified, in UTC.

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

PartnerId

string

The ID of the corresponding primary/standby database.

null

ConnExtraAttributes

any

Extra connection attributes. For details, see the Appendix.

null

Appendix

Kafka

{
    "connExtraAttributes":{
        "endpoint":"xxx.xxx.xxx.1:2883",
        "username":null,
        "enableSSL":null,
        "enableSASL":null,
        "saslMechanism":null,
        "disableIdentificationAlgorithm":false
    }
}
ParameterTypeDescription
endpointstringService endpoint.
usernamestringUsername. Required when the authentication method is PLAIN, SCRAM-SHA-256, or SCRAM-SHA-512.
enableSSLbooleanEnables SSL authentication. If enabled, you must upload a trusted certificate.
enableSASLbooleanEnables SASL authentication.
saslMechanismKafkaSaslMechanisnEnumThe SASL authentication mechanism. Valid values are PLAIN, SCRAM-SHA-256, SCRAM-SHA-512, and KERBEROS.
disableIdentificationAlgorithmbooleanDisables hostname verification during SSL authentication.

DataHub

{
    "connExtraAttributes":{
        "endpoint":"xxx.xxx.xxx.1:2883",
        "project":"detx***"
    }
}
ParameterTypeDescription
endpointstringService endpoint.
projectstringProject name.

RocketMQ

{
    "connExtraAttributes":{
        "endpoint":"xxx.xxx.xxx.1:2883",
        "endpointType":null,
        "version":null
    }
}
ParameterTypeDescription
endpointstringService endpoint.
endpointTypeCloudRocketMQEndpoint.TypeEndpoint type.
versionCloudRocketMQInst.VersionRocketMQ version.

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
    }
}
ParameterTypeDescription
clusterstringCluster name.
tenantstringTenant name.
isLogicSourcebooleanIndicates if the data source is logical.
useLogProxybooleanEnables the use of LogProxy.
drcUserstringdrc_user configuration.
configUrlstringThe URL to retrieve addresses of underlying OceanBase servers.
logProxyIpstringThe LogProxy service IP address.
logProxyPortintegerThe LogProxy service port.
noUserAuthbooleanBypasses user authentication. This is used when Data Transmission Service automatically generates the data source for synchronization with DataWorks, in which case user credentials may not be available.

TiDB

{
    "connExtraAttributes":{
        "kafkaId":"e_edz****",
        "kafkaTopic":"test**",
        "kafkaName":"denz***"
    }
}
ParameterTypeDescription
kafkaIdstringID of the bound Kafka data source.
kafkaTopicstringName of the bound Kafka topic.
kafkaNamestringName of the bound Kafka data source.

Examples

Success response

JSON format

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

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.