本接口用于数据迁移或数据同步项目列表页面的分页查询。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
授权信息
当前API暂无授权信息透出。
请求参数
名称 | 类型 | 必填 | 描述 | 示例值 |
---|---|---|---|---|
SearchKey | string | 否 | 数据迁移或数据同步项目的名称/ID。 | np_4w**** |
Type | string | 否 | 项目的类型,包括 | MIGRATION |
Status | array | 否 | 数据迁移或数据同步项目的状态集合,包括 INIT(未启动), RUNNING(运行中)、SUSPEND(已暂停)、FAILED(失败)、FINISHED(已完成)、RELEASING(释放中)、RELEASED(已释放)、DELETED(已删除)、RUNNING_MODIFYING(修改中)、RUNNING_MERGING(合并中)、RUNNING_ALARMING(告警中)和 UNCONFIGURED(待配置)。 | |
string | 否 | 数据迁移或数据同步项目的状态。 | RUNNING | |
LabelIds | array | 否 | 标签 ID 的集合,最多支持 5 个。 | |
string | 否 | 标签 ID。 | l_dfe**** | |
SourceEndpointTypes | array | 否 | 源端数据源类型的集合。 | |
string | 否 | 源端数据源的类型。 枚举值:
| MYSQL | |
SinkEndpointTypes | array | 否 | 目标端数据源类型的集合。 | |
string | 否 | 目标端数据源的类型。 枚举值:
| MYSQL | |
VisibleSubProject | boolean | 否 | 是否展示子项目。 | false |
SortField | string | 否 | 排序字段,包括 | gmtCreate |
Order | string | 否 | 排列顺序,包括 | descend |
NeedRelatedInfo | boolean | 否 | 是否需要查询项目关联信息(数据源连接信息、传输实例信息、项目步骤信息等),默认值为 true。 | true |
PageNumber | integer | 否 | 页序号,分页查询时生效。 | 1 |
PageSize | integer | 否 | 页大小,分页查询时生效。 | 10 |
返回参数
附录
Kafka
{
"connExtraAttributes":{
"endpoint":"xxx.xxx.xxx.1:2883",
"username":null,
"enableSSL":null,
"enableSASL":null,
"saslMechanism":null,
"disableIdentificationAlgorithm":false
}
}
参数 | 类型 | 描述 |
---|---|---|
endpoint | string | 服务地址。 |
username | string | 用户名。当您选择认证方式为 PLAIN、SCRAM-SHA-256 和 SCRAM-SHA-512 时,该参数必填。 |
enableSSL | boolean | 是否开启 SSL 认证。如果开启,则需要上传授信证书。 |
enableSASL | boolean | 是否开启 SASL 认证。 |
saslMechanism | KafkaSaslMechanisnEnum | 加密方式,包括 PLAIN、SCRAM-SHA-256、SCRAM-SHA-512 和 KERBEROS。 |
disableIdentificationAlgorithm | boolean | SSL 加密时,是否开启主机名验证。 |
DataHub
{
"connExtraAttributes":{
"endpoint":"xxx.xxx.xxx.1:2883",
"project":"detx***"
}
}
参数 | 类型 | 描述 |
---|---|---|
endpoint | string | 服务地址。 |
project | string | 项目的名称。 |
RocketMQ
{
"connExtraAttributes":{
"endpoint":"xxx.xxx.xxx.1:2883",
"endpointType":null,
"version":null
}
}
参数 | 类型 | 描述 |
---|---|---|
endpoint | string | 服务地址。 |
endpointType | CloudRocketMQEndpoint.Type | 服务地址的类型。 |
version | CloudRocketMQInst.Version | RocketMQ 的版本。 |
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
}
}
参数 | 类型 | 描述 |
---|---|---|
cluster | string | 集群的名称。 |
tenant | string | 租户的名称。 |
isLogicSource | boolean | 是否为逻辑数据源。 |
useLogProxy | boolean | 是否使用 LogProxy。 |
drcUser | string | drc_user 的配置。 |
configUrl | string | 用于获取 OceanBase 数据库底层服务器的真实地址。 |
logProxyIp | string | LogProxy 服务的 IP 地址。 |
logProxyPort | integer | LogProxy 服务的端口。 |
noUserAuth | boolean | 对于同步 DataWorks 的接口,数据源是 OMS 自动生成的。如果没有用户账号和密码,则不能连接用户的 OceanBase 数据库。 |
TiDB
{
"connExtraAttributes":{
"kafkaId":"e_edz****",
"kafkaTopic":"test**",
"kafkaName":"denz***"
}
}
参数 | 类型 | 描述 |
---|---|---|
kafkaId | string | 绑定的 Kafka 数据源的 ID。 |
kafkaTopic | string | 绑定的 Kafka Topic 的名称。 |
kafkaName | string | 绑定的 Kafka 数据源的名称。 |
示例
正常返回示例
JSON
格式
{
"Success": true,
"ErrorDetail": {
"Code": "CM-RESOAT1111\n",
"Level": "ERROR",
"Message": "A system error occurred.\n",
"ExtraContext": {
"key": "null"
},
"MessageMcmsKey": "null",
"MessageMcmsContext": {
"key": "null"
},
"Reason": "null",
"ReasonMcmsKey": "null",
"ReasonMcmsContext": {
"key": "null"
},
"Proposal": "Contact the administrator. ",
"ProposalMcmsKey": "null",
"ProposalMcmsContext": {
"key": "null"
},
"UpstreamErrorDetail": "null"
},
"Code": "INNER_ERROR",
"Message": "A system error occurred.\n",
"Advice": "Contact the administrator. ",
"RequestId": "EE205C00-30E4-XXXX-XXXX-87E3A8A2AA0C",
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 4,
"Cost": "1",
"Data": [
{
"WorkerGradeId": "g_i4wa7***",
"WorkerGradeInfo": {
"Id": "g_i4wa7***",
"Name": "i5fu***",
"Grade": "OMS_G2_MIGRATION_LARGE",
"Spec": "LARGE",
"SpecName": "LARGE",
"SourceType": "OB_MYSQL",
"SourceRegion": "ap-southeast-1",
"DestType": "OB_MYSQL",
"DestRegion": "ap-southeast-1",
"ChargeType": "POSTPAY",
"AutoRenewal": false,
"Expired": false,
"EndTime": "2024-01-28T15:07:44",
"GmtCreate": "2024-01-28T14:07:44"
},
"Id": "np_4w****\n",
"Type": "MIGRATION",
"Name": "project_name",
"Labels": [
{
"Id": "l_dfe****\n",
"Name": "label_name",
"Creator": "admin",
"Type": 1,
"Count": 2
}
],
"Owner": "admin",
"Importance": "MEDIUM",
"Status": "RUNNING",
"GmtCreate": "2023-07-13T06:26:15",
"GmtModified": "2023-07-13T07:01:27",
"GmtStart": "2023-07-13T07:02:27",
"GmtFinish": "2023-07-13T08:01:27",
"DestConnId": "null",
"IsMerging": false,
"IsModifying": false,
"IsSubProject": false,
"SourceEndpointType": "MYSQL",
"SinkEndpointType": "OB_MYSQL",
"TransferMapping": {
"Mode": "SPECIFIC"
},
"CommonTransferConfig": {
"TableCategory": "ALL",
"ActiveActive": false,
"MqSerializerType": "DEFAULT",
"MqPartitionMode": "ONE",
"MqPartition": 0,
"DatahubTopicType": "TUPLE",
"RocketMqProducerGroup": "OMS",
"RocketMqMsgTags": "default_tag",
"RocketMqEnableMsgTrace": false,
"RocketMqSendMsgTimeout": 0,
"DataWorksBusinessName": "null"
},
"EnableStructTransfer": true,
"StructTransferConfig": {
"ByteCharConvertStrategy": "DO_NOTHING_IF_BYTE_USED",
"DeferIndexCreation": false
},
"EnableFullTransfer": true,
"EnableFullVerify": true,
"FullTransferConfig": {
"NonePkUkTruncateDstTable": false,
"AllowDestTableNotEmpty": false,
"FullTransferSpeedMode": "NORMAL",
"FullVerifySpeedMode": "NORMAL"
},
"EnableIncrTransfer": true,
"EnableIncrVerify": true,
"EnableReverseIncrTransfer": true,
"IncrTransferConfig": {
"StartTimestamp": 1681004708,
"RecordTypeWhiteList": [
"INSERT"
],
"StoreLogKeptHour": 24,
"EnableSequencingWithinTxn": true,
"IncrSyncConcurrency": 64,
"EnableIncrSyncStatistics": true
},
"SourceConnectInfo": {
"Id": "c_4w3aq****",
"EndpointName": "ration12****0obmysql4116892***",
"EndpointId": "e_4w3al***",
"EndpointSide": "source",
"DbEngine": "OB_MYSQL_PUBLIC",
"ConnectionInfo": "null",
"Username": "oms931mys**",
"Version": "5.7.27",
"Timezone": "UTC",
"Charset": "utf8mb4",
"NlsLengthSemantics": "null",
"OperatingSystem": "Linux",
"Region": "cn-hangzhou",
"OcpName": "null",
"ConnExtraAttributes": "null",
"Owner": "admin",
"ResourceOwner": "1325847***",
"Host": "xxx.xxx.xxx.1\n",
"Port": 2883
},
"SinkConnectInfo": {
"Id": "c_4w3akx***",
"EndpointName": "ation129***9apimysql5616****",
"EndpointId": "e_4w3aic***",
"EndpointSide": "sink",
"DbEngine": "MYSQL_PUBLIC",
"ConnectionInfo": "null",
"Username": "oms**obmys**",
"Version": "2.2.77",
"Timezone": "+08:00",
"Charset": "utf8mb4",
"NlsLengthSemantics": "null",
"OperatingSystem": "Linux",
"Region": "cn-hangzhou",
"OcpName": "null",
"ConnExtraAttributes": "null",
"Owner": "admin",
"ResourceOwner": "1325847***",
"Host": "xxx.xxx.xxx.1",
"Port": 2883
},
"Steps": [
{
"Order": 1,
"Name": "TRANSFER_PRECHECK",
"Description": "预检查",
"Status": "RUNNING",
"ExtraInfo": {
"ErrorDetails": [
{
"Code": "CM-RESOAT1111\n",
"Level": "ERROR",
"Message": "A system error occurred.",
"ExtraContext": {
"key": "null"
},
"MessageMcmsKey": "null",
"MessageMcmsContext": {
"key": "null"
},
"Reason": "null",
"ReasonMcmsKey": "null",
"ReasonMcmsContext": {
"key": "null"
},
"Proposal": "Contact the administrator. ",
"ProposalMcmsKey": "null",
"ProposalMcmsContext": {
"key": "null"
},
"UpstreamErrorDetail": "null"
}
],
"ErrorCode": "INNER_ERROR",
"ErrorMsg": "A system error occurred.\n",
"ErrorParam": {
"key": "null"
},
"FailedTime": "null"
},
"StartTime": "2020-05-22T17:04:18",
"FinishTime": "2020-05-22T17:05:18",
"Progress": 100,
"StepInfo": null
}
],
"ExtraInfo": {
"RunningStep": "TRANSFER_PRECHECK",
"RunningProgress": 90,
"MonitoringIncr": true,
"Subtopics": [
"null"
],
"ReverseSubtopics": [
"null"
],
"LogServiceStartCheckpoint": 1689214358,
"SourceStoreKeptHour": 24,
"SyncDelay": 0,
"SyncDelaySampleTimestamp": 1689214358,
"AccessObSource": true,
"OverwriteConfig": true,
"IgnoreUnsupportDdl": true,
"SubDbs": {
"key": [
{
"ClusterName": "cluster_name",
"TenantName": "tenant_name",
"DatabaseId": "null",
"DatabaseName": "db_name",
"MappingDatabaseName": "mapped_db",
"SourceClientId": "null",
"Tables": [
{
"TableId": "null",
"Database": "db_name",
"TableName": "table_name",
"MappingTableName": "mapped_name",
"Instance": "g_i4kat***",
"Columns": [
{
"ColumnName": "column_name",
"Position": 0,
"ColumnType": "null",
"RecordFieldType": "null",
"RawColumnType": "null",
"ColumnKey": "null",
"Nullable": false,
"DefaultValue": "null",
"DataLength": 0,
"DataPrecision": 64,
"DataScale": 0,
"Encoding": "utf8",
"ColumnComment": "comments",
"IsGenerateField": false
}
]
}
]
}
]
},
"SubConds": {
"key": [
{
"TenantName": "tenant_name",
"Database": "db_name",
"DestDatabase": "dest_db",
"TableName": "table_name",
"DestName": "dest_name",
"WhereClause": "id>1",
"FilterColumns": [
"col"
],
"ShardColumns": [
"col"
],
"LogicTableId": "null",
"SourceEndpointId": "null",
"SourceClientId": "null"
}
]
},
"SubIds": {
"key": "null"
},
"MaxConnectorCount": -1,
"StoreIncr": true,
"IncrSyncTimestamp": 1689244596
},
"AlarmStats": {
"Target": "null",
"Alarming": false,
"RecentlyTriggerCount": 0,
"RuleToRecentlyTriggerCount": {
"key": 0
},
"AlarmContent": "null",
"OpenMonitor": true
}
}
]
}
错误码
访问错误中心查看更多错误码。
变更历史
变更时间 | 变更内容概要 | 操作 |
---|---|---|
2024-03-20 | OpenAPI 入参发生变更、OpenAPI 返回结构发生变更 | 查看变更详情 |