tencent cloud

腾讯云 BI

产品简介
产品概述
产品优势
产品功能
应用场景
购买指南
计费说明
购买指引
升配说明
续费说明
快速入门
数据接入
创建 VPC 数据源
创建云数据源
创建自有数据源
数据建表和数据加工
数据分析基础知识介绍
数据建表
数据加工
数据分析
分析设置
交互分析
即席分析
数据可视化
公共样式设置说明
筛选组件
图表组件
富文本组件
其他组件
移动端布局编辑器
主题设置介绍
页面布局介绍
看板目录管理
协作及应用
推送渠道管理
报表推送
分享
嵌出
自助取数
指标告警
数据安全
参数构建
平台管理
账号及权限管理
统计及分析
系统设置
资源迁移
实践教程
优化实践合集
如何做趋势分析
如何做占比分析
如何使用 Excel 文件分析数据
如何做表格
常见问题
相关协议
服务等级协议
隐私协议
数据处理和安全协议
联系我们
文档腾讯云 BI

CreateDatasource

聚焦模式
字号
最后更新时间: 2026-03-19 19:09:29

1. API Description

Domain name for API request: bi.intl.tencentcloudapi.com.

This API is used to create a data source.

A maximum of 100 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: CreateDatasource.
Version Yes String Common Params. The value used for this API: 2022-01-05.
Region No String Common Params. This parameter is not required.
DbHost Yes String HOST
DbPort Yes Integer Port.
ServiceType Yes String The backend provides dictionaries: domain type. 1. Tencent Cloud, 2. local.
DbType Yes String Drive.
Value range:.
MYSQL: MYSQL database.
PRESTO: presto database.
POSTGRE: PostgreSQL database.
DLC: dlc database.
MSSQL: microsoft SQL Server database.
Charset Yes String Database encoding.
DbUser Yes String Username.
DbPwd Yes String Password.
DbName Yes String Database name.
SourceName Yes String Database alias.
ProjectId Yes Integer Project ID.
Catalog No String Catalog value.
DataOrigin No String Third-party data source identifier.
DataOriginProjectId No String Third-party project ID.
DataOriginDatasourceId No String Third-party data source ID.
ExtraParam No String Extension parameter.
UniqVpcId No String Unified identifier of the Tencent Cloud VPC.
Vip No String VPC IP address.
Vport No String VPC port.
VpcId No String Tencent Cloud VPC identifier.
OperationAuthLimit.N No Array of String Operation permission limitation.
UseVPC No Boolean Enables VPC.
RegionId No String Region.
Schema No String Database schema.
DbVersion No String Database version.

3. Output Parameters

Parameter Name Type Description
ErrorInfo ErrorInfo Custom error information object.
Note: This field may return null, indicating that no valid values can be obtained.
Data IdDTO Data source ID.
Note: This field may return null, indicating that no valid values can be obtained.
Extra String Additional information.
Note: This field may return null, indicating that no valid values can be obtained.
Msg String Prompt.
Note: This field may return null, indicating that no valid values can be obtained.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Creating a Data Source

This example shows you how to create a data source.

Input Example

POST / HTTP/1.1
Host: bi.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateDatasource
<Common request parameters>

{
    "DbHost": "DbHost",
    "DbPort": 1982493789748932,
    "ServiceType": "ServiceType",
    "DbType": "DbType",
    "Charset": "Charset",
    "DbUser": "DbUser",
    "DbPwd": "DbPwd",
    "DbName": "DbName",
    "SourceName": "SourceName",
    "ProjectId": 1982493789748932,
    "Catalog": "Catalog",
    "DataOrigin": "DataOrigin",
    "DataOriginProjectId": "DataOriginProjectId",
    "DataOriginDatasourceId": "DataOriginDatasourceId",
    "ExtraParam": "ExtraParam",
    "UniqVpcId": "UniqVpcId",
    "Vip": "Vip",
    "Vport": "Vport",
    "VpcId": "VpcId",
    "OperationAuthLimit": [
        "OperationAuthLimit"
    ],
    "UseVPC": false,
    "RegionId": "RegionId"
}

Output Example

{
    "Response": {
        "Msg": "Internal server error",
        "RequestId": "xxx-xx-x",
        "Extra": "",
        "Data": null,
        "ErrorInfo": {
            "ErrorTip": "Internal server error",
            "ErrorMessage": "Internal server error",
            "ErrorLevel": "ERROR"
        }
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
AuthFailure CAM signature/authentication error.
FailedOperation Operation failed.
InternalError Internal error.
InternalError.Internal Internal error.
InvalidParameter Parameter error.
InvalidParameterValue Parameter value error.
LimitExceeded The quota limit is exceeded.
MissingParameter Parameters are missing.
MissingParameter.MissingParam The required parameter is missing.
OperationDenied Operation denied.
RequestLimitExceeded Too many and frequent requests.
UnauthorizedOperation Unauthorized operation.
UnauthorizedOperation.Authorize Permission error.
UnknownParameter Unknown parameter error.
UnsupportedOperation The operation is not supported.
UnsupportedOperation.BIError Default business exception.

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈