1. 接口描述
接口请求域名: ckafka.tencentcloudapi.com 。
查询Datahub任务信息
默认接口请求频率限制:20次/秒。
推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。
2. 输入参数
以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数。
参数名称 | 必选 | 类型 | 描述 |
---|---|---|---|
Action | 是 | String | 公共参数,本接口取值:DescribeDatahubTask。 |
Version | 是 | String | 公共参数,本接口取值:2019-08-19。 |
Region | 是 | String | 公共参数,详见产品支持的 地域列表。 |
TaskId | 是 | String | 任务id 示例值:xxx |
3. 输出参数
参数名称 | 类型 | 描述 |
---|---|---|
Result | DescribeDatahubTaskRes | 返回结果 示例值:xxx |
RequestId | String | 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。 |
4. 示例
示例1 查询Datahub任务信息
输入示例
POST / HTTP/1.1
Host: ckafka.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDatahubTask
<公共请求参数>
{
"TaskId": "abc"
}
输出示例
{
"Response": {
"Result": {
"TaskId": "abc",
"TaskName": "abc",
"TaskType": "abc",
"Status": 0,
"SourceResource": {
"Type": "abc",
"KafkaParam": {
"SelfBuilt": true,
"Resource": "abc",
"Topic": "abc",
"OffsetType": "abc",
"StartTime": 1,
"ResourceName": "abc",
"ZoneId": 0,
"TopicId": "abc",
"PartitionNum": 0,
"EnableToleration": true,
"QpsLimit": 1,
"TableMappings": [
{
"Database": "abc",
"Table": "abc",
"Topic": "abc",
"TopicId": "abc"
}
],
"UseTableMapping": true,
"UseAutoCreateTopic": true,
"CompressionType": "abc",
"MsgMultiple": 0,
"ConnectorSyncType": "abc",
"KeepPartition": true
},
"EventBusParam": {
"Type": "abc",
"SelfBuilt": true,
"Resource": "abc",
"Namespace": "abc",
"FunctionName": "abc",
"Qualifier": "abc"
},
"MongoDBParam": {
"Database": "abc",
"Collection": "abc",
"CopyExisting": true,
"Resource": "abc",
"Ip": "abc",
"Port": 0,
"UserName": "abc",
"Password": "abc",
"ListeningEvent": "abc",
"ReadPreference": "abc",
"Pipeline": "abc",
"SelfBuilt": true
},
"EsParam": {
"Resource": "abc",
"Port": 0,
"UserName": "abc",
"Password": "abc",
"SelfBuilt": true,
"ServiceVip": "abc",
"UniqVpcId": "abc",
"DropInvalidMessage": true,
"Index": "abc",
"DateFormat": "abc",
"ContentKey": "abc",
"DropInvalidJsonMessage": true,
"DocumentIdField": "abc",
"IndexType": "abc",
"DropCls": {
"DropInvalidMessageToCls": true,
"DropClsRegion": "abc",
"DropClsOwneruin": "abc",
"DropClsTopicId": "abc",
"DropClsLogSet": "abc"
},
"DatabasePrimaryKey": "abc",
"DropDlq": {
"Type": "abc",
"KafkaParam": {
"SelfBuilt": true,
"Resource": "abc",
"Topic": "abc",
"OffsetType": "abc",
"StartTime": 1,
"ResourceName": "abc",
"ZoneId": 0,
"TopicId": "abc",
"PartitionNum": 0,
"EnableToleration": true,
"QpsLimit": 1,
"TableMappings": [
{
"Database": "abc",
"Table": "abc",
"Topic": "abc",
"TopicId": "abc"
}
],
"UseTableMapping": true,
"UseAutoCreateTopic": true,
"CompressionType": "abc",
"MsgMultiple": 0,
"ConnectorSyncType": "abc",
"KeepPartition": true
},
"RetryInterval": 1,
"MaxRetryAttempts": 1,
"TopicParam": {
"Resource": "abc",
"OffsetType": "abc",
"StartTime": 1,
"TopicId": "abc",
"CompressionType": "abc",
"UseAutoCreateTopic": true,
"MsgMultiple": 0
},
"DlqType": "abc"
},
"RecordMappingList": [
{
"ColumnName": "abc",
"JsonKey": "abc"
}
],
"DateField": "abc",
"RecordMappingMode": "abc"
},
"TdwParam": {
"Bid": "abc",
"Tid": "abc",
"IsDomestic": true,
"TdwHost": "abc",
"TdwPort": 0
},
"DtsParam": {
"Resource": "abc",
"Ip": "abc",
"Port": 0,
"Topic": "abc",
"GroupId": "abc",
"GroupUser": "abc",
"GroupPassword": "abc",
"TranSql": true
},
"ClickHouseParam": {
"Ip": "abc",
"Port": 0,
"UserName": "abc",
"Password": "abc",
"Cluster": "abc",
"Database": "abc",
"Table": "abc",
"Schema": [
{
"ColumnName": "abc",
"JsonKey": "abc",
"Type": "abc",
"AllowNull": true
}
],
"ServiceVip": "abc",
"UniqVpcId": "abc",
"Resource": "abc",
"SelfBuilt": true,
"DropInvalidMessage": true,
"Type": "abc",
"DropCls": {
"DropInvalidMessageToCls": true,
"DropClsRegion": "abc",
"DropClsOwneruin": "abc",
"DropClsTopicId": "abc",
"DropClsLogSet": "abc"
},
"BatchSize": 0,
"ConsumerFetchMinBytes": 0,
"ConsumerFetchMaxWaitMs": 0
},
"ClsParam": {
"DecodeJson": true,
"Resource": "abc",
"LogSet": "abc",
"ContentKey": "abc",
"TimeField": "abc"
},
"CosParam": {
"BucketName": "abc",
"Region": "abc",
"ObjectKey": "abc",
"AggregateBatchSize": 1,
"AggregateInterval": 1,
"FormatOutputType": "abc",
"ObjectKeyPrefix": "abc",
"DirectoryTimeFormat": "abc"
},
"MySQLParam": {
"Database": "abc",
"Table": "abc",
"Resource": "abc",
"SnapshotMode": "abc",
"DdlTopic": "abc",
"DataSourceMonitorMode": "abc",
"DataSourceMonitorResource": "abc",
"DataSourceIncrementMode": "abc",
"DataSourceIncrementColumn": "abc",
"DataSourceStartFrom": "abc",
"DataTargetInsertMode": "abc",
"DataTargetPrimaryKeyField": "abc",
"DataTargetRecordMapping": [
{
"JsonKey": "abc",
"Type": "abc",
"AllowNull": true,
"ColumnName": "abc",
"ExtraInfo": "abc",
"ColumnSize": "abc",
"DecimalDigits": "abc",
"AutoIncrement": true,
"DefaultValue": "abc"
}
],
"TopicRegex": "abc",
"TopicReplacement": "abc",
"KeyColumns": "abc",
"DropInvalidMessage": true,
"DropCls": {
"DropInvalidMessageToCls": true,
"DropClsRegion": "abc",
"DropClsOwneruin": "abc",
"DropClsTopicId": "abc",
"DropClsLogSet": "abc"
},
"OutputFormat": "abc",
"IsTablePrefix": true,
"IncludeContentChanges": "abc",
"IncludeQuery": true,
"RecordWithSchema": true,
"SignalDatabase": "abc",
"IsTableRegular": true,
"SignalTable": "abc",
"DateTimeZone": "abc",
"SelfBuilt": true
},
"PostgreSQLParam": {
"Database": "abc",
"Table": "abc",
"Resource": "abc",
"PluginName": "abc",
"SnapshotMode": "abc",
"DataFormat": "abc",
"DataTargetInsertMode": "abc",
"DataTargetPrimaryKeyField": "abc",
"DataTargetRecordMapping": [
{
"JsonKey": "abc",
"Type": "abc",
"AllowNull": true,
"ColumnName": "abc",
"ExtraInfo": "abc",
"ColumnSize": "abc",
"DecimalDigits": "abc",
"AutoIncrement": true,
"DefaultValue": "abc"
}
],
"DropInvalidMessage": true,
"IsTableRegular": true,
"KeyColumns": "abc",
"RecordWithSchema": true
},
"TopicParam": {
"Resource": "abc",
"OffsetType": "abc",
"StartTime": 1,
"TopicId": "abc",
"CompressionType": "abc",
"UseAutoCreateTopic": true,
"MsgMultiple": 0
},
"MariaDBParam": {
"Database": "abc",
"Table": "abc",
"Resource": "abc",
"SnapshotMode": "abc",
"KeyColumns": "abc",
"IsTablePrefix": true,
"OutputFormat": "abc",
"IncludeContentChanges": "abc",
"IncludeQuery": true,
"RecordWithSchema": true
},
"SQLServerParam": {
"Database": "abc",
"Table": "abc",
"Resource": "abc",
"SnapshotMode": "abc"
},
"CtsdbParam": {
"Resource": "abc",
"CtsdbMetric": "abc"
},
"ScfParam": {
"FunctionName": "abc",
"Namespace": "abc",
"Qualifier": "abc",
"BatchSize": 0,
"MaxRetries": 0
},
"MqttParam": {
"Topics": "abc",
"CleanSession": true,
"Resource": "abc",
"Ip": "abc",
"Port": 0,
"UserName": "abc",
"Password": "abc",
"Qos": 0,
"MaxTasks": 0,
"ServiceVip": "abc",
"UniqVpcId": "abc",
"SelfBuilt": true
}
},
"TargetResource": {
"Type": "abc",
"KafkaParam": {
"SelfBuilt": true,
"Resource": "abc",
"Topic": "abc",
"OffsetType": "abc",
"StartTime": 1,
"ResourceName": "abc",
"ZoneId": 0,
"TopicId": "abc",
"PartitionNum": 0,
"EnableToleration": true,
"QpsLimit": 1,
"TableMappings": [
{
"Database": "abc",
"Table": "abc",
"Topic": "abc",
"TopicId": "abc"
}
],
"UseTableMapping": true,
"UseAutoCreateTopic": true,
"CompressionType": "abc",
"MsgMultiple": 0,
"ConnectorSyncType": "abc",
"KeepPartition": true
},
"EventBusParam": {
"Type": "abc",
"SelfBuilt": true,
"Resource": "abc",
"Namespace": "abc",
"FunctionName": "abc",
"Qualifier": "abc"
},
"MongoDBParam": {
"Database": "abc",
"Collection": "abc",
"CopyExisting": true,
"Resource": "abc",
"Ip": "abc",
"Port": 0,
"UserName": "abc",
"Password": "abc",
"ListeningEvent": "abc",
"ReadPreference": "abc",
"Pipeline": "abc",
"SelfBuilt": true
},
"EsParam": {
"Resource": "abc",
"Port": 0,
"UserName": "abc",
"Password": "abc",
"SelfBuilt": true,
"ServiceVip": "abc",
"UniqVpcId": "abc",
"DropInvalidMessage": true,
"Index": "abc",
"DateFormat": "abc",
"ContentKey": "abc",
"DropInvalidJsonMessage": true,
"DocumentIdField": "abc",
"IndexType": "abc",
"DatabasePrimaryKey": "abc",
"DropDlq": {
"Type": "abc",
"RetryInterval": 1,
"MaxRetryAttempts": 1,
"TopicParam": {
"Resource": "abc",
"OffsetType": "abc",
"StartTime": 1,
"TopicId": "abc",
"CompressionType": "abc",
"UseAutoCreateTopic": true,
"MsgMultiple": 0
},
"DlqType": "abc"
},
"RecordMappingList": [
{
"ColumnName": "abc",
"JsonKey": "abc"
}
],
"DateField": "abc",
"RecordMappingMode": "abc"
},
"TdwParam": {
"Bid": "abc",
"Tid": "abc",
"IsDomestic": true,
"TdwHost": "abc",
"TdwPort": 0
},
"DtsParam": {
"Resource": "abc",
"Ip": "abc",
"Port": 0,
"Topic": "abc",
"GroupId": "abc",
"GroupUser": "abc",
"GroupPassword": "abc",
"TranSql": true
},
"ClickHouseParam": {
"Ip": "abc",
"Port": 0,
"UserName": "abc",
"Password": "abc",
"Cluster": "abc",
"Database": "abc",
"Table": "abc",
"Schema": [
{
"ColumnName": "abc",
"JsonKey": "abc",
"Type": "abc",
"AllowNull": true
}
],
"ServiceVip": "abc",
"UniqVpcId": "abc",
"Resource": "abc",
"SelfBuilt": true,
"DropInvalidMessage": true,
"Type": "abc",
"BatchSize": 0,
"ConsumerFetchMinBytes": 0,
"ConsumerFetchMaxWaitMs": 0
},
"ClsParam": {
"DecodeJson": true,
"Resource": "abc",
"LogSet": "abc",
"ContentKey": "abc",
"TimeField": "abc"
},
"CosParam": {
"BucketName": "abc",
"Region": "abc",
"ObjectKey": "abc",
"AggregateBatchSize": 1,
"AggregateInterval": 1,
"FormatOutputType": "abc",
"ObjectKeyPrefix": "abc",
"DirectoryTimeFormat": "abc"
},
"MySQLParam": {
"Database": "abc",
"Table": "abc",
"Resource": "abc",
"SnapshotMode": "abc",
"DdlTopic": "abc",
"DataSourceMonitorMode": "abc",
"DataSourceMonitorResource": "abc",
"DataSourceIncrementMode": "abc",
"DataSourceIncrementColumn": "abc",
"DataSourceStartFrom": "abc",
"DataTargetInsertMode": "abc",
"DataTargetPrimaryKeyField": "abc",
"DataTargetRecordMapping": [
{
"JsonKey": "abc",
"Type": "abc",
"AllowNull": true,
"ColumnName": "abc",
"ExtraInfo": "abc",
"ColumnSize": "abc",
"DecimalDigits": "abc",
"AutoIncrement": true,
"DefaultValue": "abc"
}
],
"TopicRegex": "abc",
"TopicReplacement": "abc",
"KeyColumns": "abc",
"DropInvalidMessage": true,
"OutputFormat": "abc",
"IsTablePrefix": true,
"IncludeContentChanges": "abc",
"IncludeQuery": true,
"RecordWithSchema": true,
"SignalDatabase": "abc",
"IsTableRegular": true,
"SignalTable": "abc",
"DateTimeZone": "abc",
"SelfBuilt": true
},
"PostgreSQLParam": {
"Database": "abc",
"Table": "abc",
"Resource": "abc",
"PluginName": "abc",
"SnapshotMode": "abc",
"DataFormat": "abc",
"DataTargetInsertMode": "abc",
"DataTargetPrimaryKeyField": "abc",
"DropInvalidMessage": true,
"IsTableRegular": true,
"KeyColumns": "abc",
"RecordWithSchema": true
},
"MariaDBParam": {
"Database": "abc",
"Table": "abc",
"Resource": "abc",
"SnapshotMode": "abc",
"KeyColumns": "abc",
"IsTablePrefix": true,
"OutputFormat": "abc",
"IncludeContentChanges": "abc",
"IncludeQuery": true,
"RecordWithSchema": true
},
"SQLServerParam": {
"Database": "abc",
"Table": "abc",
"Resource": "abc",
"SnapshotMode": "abc"
},
"CtsdbParam": {
"Resource": "abc",
"CtsdbMetric": "abc"
},
"ScfParam": {
"FunctionName": "abc",
"Namespace": "abc",
"Qualifier": "abc",
"BatchSize": 0,
"MaxRetries": 0
},
"MqttParam": {
"Topics": "abc",
"CleanSession": true,
"Resource": "abc",
"Ip": "abc",
"Port": 0,
"UserName": "abc",
"Password": "abc",
"Qos": 0,
"MaxTasks": 0,
"ServiceVip": "abc",
"UniqVpcId": "abc",
"SelfBuilt": true
}
},
"Connections": [
{
"TopicName": "abc",
"GroupId": "abc",
"TopicId": "abc"
}
],
"CreateTime": "abc",
"TransformParam": {
"AnalysisFormat": "abc",
"Regex": "abc",
"MapParam": [
{
"Key": "abc",
"Type": "abc",
"Value": "abc"
}
],
"FilterParam": [
{
"Key": "abc",
"Type": "abc",
"MatchMode": "abc",
"Value": "abc"
}
],
"OutputFormat": "abc",
"FailureParam": {
"Type": "abc",
"RetryInterval": 1,
"MaxRetryAttempts": 1,
"DlqType": "abc",
"KafkaParam": {
"SelfBuilt": true,
"Resource": "ccc",
"Topic": "ac",
"OffsetType": "c",
"StartTime": 1703990000,
"ResourceName": "cnnnc",
"ZoneId": 120399,
"TopicId": "corooco",
"PartitionNum": 1,
"EnableToleration": true,
"QpsLimit": 133,
"TableMappings": [],
"UseTableMapping": true,
"UseAutoCreateTopic": true,
"CompressionType": "",
"MsgMultiple": 1,
"ConnectorSyncType": "",
"KeepPartition": true
},
"TopicParam": {
"Resource": "",
"OffsetType": "",
"StartTime": 139001030,
"CompressionType": "cc",
"UseAutoCreateTopic": true,
"MsgMultiple": 1
}
},
"Content": "abc",
"SourceType": "abc",
"Result": "abc",
"AnalyseResult": [
{
"Key": "abc",
"Type": "abc",
"Value": "abc"
}
],
"UseEventBus": true
},
"DatahubId": "abc",
"SchemaId": "abc",
"SchemaName": "abc",
"TransformsParam": {
"Content": "abc",
"FailureParam": {
"Type": "abc",
"RetryInterval": 1,
"MaxRetryAttempts": 1,
"DlqType": "abc",
"KafkaParam": {
"SelfBuilt": true,
"Resource": "ccc",
"Topic": "ac",
"OffsetType": "c",
"StartTime": 1703990000,
"ResourceName": "cnnnc",
"ZoneId": 120399,
"TopicId": "corooco",
"PartitionNum": 1,
"EnableToleration": true,
"QpsLimit": 133,
"TableMappings": [],
"UseTableMapping": true,
"UseAutoCreateTopic": true,
"CompressionType": "",
"MsgMultiple": 1,
"ConnectorSyncType": "",
"KeepPartition": true
},
"TopicParam": {
"Resource": "",
"OffsetType": "",
"StartTime": 139001030,
"CompressionType": "cc",
"UseAutoCreateTopic": true,
"MsgMultiple": 1
}
},
"FieldChain": [
{
"Analyse": {
"Format": "abc",
"Regex": "abc",
"InputValueType": "abc",
"InputValue": "abc"
},
"SecondaryAnalyse": {
"Regex": "abc"
},
"SMT": [
{
"Key": "abc",
"Operate": "abc",
"SchemeType": "abc",
"Value": "abc",
"ValueOperate": {
"Type": "abc",
"Replace": {
"OldValue": "abc",
"NewValue": "abc"
},
"Substr": {
"Start": 0,
"End": 0
},
"Date": {
"Format": "abc",
"TargetType": "abc",
"TimeZone": "abc"
},
"RegexReplace": {
"Regex": "abc",
"NewValue": "abc"
},
"Split": {
"Regex": "abc"
},
"KV": {
"Delimiter": "abc",
"Regex": "abc",
"KeepOriginalKey": "abc"
},
"Result": "abc",
"JsonPathReplace": {
"OldValue": "abc",
"NewValue": "abc"
},
"UrlDecode": {
"CharsetName": "abc"
},
"Lowercase": {}
},
"OriginalValue": "abc",
"ValueOperates": [
{
"Type": "abc",
"Replace": {
"OldValue": "abc",
"NewValue": "abc"
},
"Substr": {
"Start": 0,
"End": 0
},
"Date": {
"Format": "abc",
"TargetType": "abc",
"TimeZone": "abc"
},
"RegexReplace": {
"Regex": "abc",
"NewValue": "abc"
},
"Split": {
"Regex": "abc"
},
"KV": {
"Delimiter": "abc",
"Regex": "abc",
"KeepOriginalKey": "abc"
},
"Result": "abc",
"JsonPathReplace": {
"OldValue": "abc",
"NewValue": "abc"
},
"UrlDecode": {
"CharsetName": "abc"
},
"Lowercase": {}
}
]
}
],
"Result": "abc",
"AnalyseResult": [
{
"Key": "abc",
"Operate": "abc",
"SchemeType": "abc",
"Value": "abc",
"ValueOperate": {
"Type": "abc",
"Replace": {
"OldValue": "abc",
"NewValue": "abc"
},
"Substr": {
"Start": 0,
"End": 0
},
"Date": {
"Format": "abc",
"TargetType": "abc",
"TimeZone": "abc"
},
"RegexReplace": {
"Regex": "abc",
"NewValue": "abc"
},
"Split": {
"Regex": "abc"
},
"KV": {
"Delimiter": "abc",
"Regex": "abc",
"KeepOriginalKey": "abc"
},
"Result": "abc",
"JsonPathReplace": {
"OldValue": "abc",
"NewValue": "abc"
},
"UrlDecode": {
"CharsetName": "abc"
},
"Lowercase": {}
},
"OriginalValue": "abc"
}
],
"SecondaryAnalyseResult": [
{
"Key": "abc",
"Operate": "abc",
"SchemeType": "abc",
"Value": "abc",
"OriginalValue": "abc"
}
],
"AnalyseJsonResult": "abc",
"SecondaryAnalyseJsonResult": "abc"
}
],
"FilterParam": [
{
"Key": "abc",
"Type": "abc",
"MatchMode": "abc",
"Value": "abc"
}
],
"Result": "abc",
"SourceType": "abc",
"OutputFormat": "abc",
"RowParam": {
"RowContent": "abc",
"KeyValueDelimiter": "abc",
"EntryDelimiter": "abc"
},
"KeepMetadata": true,
"BatchAnalyse": {
"Format": "abc"
}
},
"ErrorMessage": "abc",
"Tags": [
{
"TagKey": "abc",
"TagValue": "abc"
}
]
},
"RequestId": "abc"
}
}
5. 开发者资源
腾讯云 API 平台
腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。
API Inspector
用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。
SDK
云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。
- Tencent Cloud SDK 3.0 for Python: GitHub Gitee
- Tencent Cloud SDK 3.0 for Java: GitHub Gitee
- Tencent Cloud SDK 3.0 for PHP: GitHub Gitee
- Tencent Cloud SDK 3.0 for Go: GitHub Gitee
- Tencent Cloud SDK 3.0 for Node.js: GitHub Gitee
- Tencent Cloud SDK 3.0 for .NET: GitHub Gitee
- Tencent Cloud SDK 3.0 for C++: GitHub Gitee
- Tencent Cloud SDK 3.0 for Ruby: GitHub Gitee
命令行工具
6. 错误码
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见 公共错误码。
错误码 | 描述 |
---|---|
AuthFailure | CAM签名/鉴权错误。 |
FailedOperation | 操作失败。 |
InternalError | 内部错误。 |
InvalidParameter | 参数错误。 |
InvalidParameterValue | 参数取值错误。 |