tencent cloud

ModifyDatasource
Last updated: 2025-11-13 21:02:46
ModifyDatasource
Last updated: 2025-11-13 21:02:46

1. API Description

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

This API is used to update 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: ModifyDatasource.
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.
Charset Yes String Database encoding.
DbUser Yes String Username.
DbPwd Yes String Password.
DbName Yes String Database name.
SourceName Yes String Database alias.
Id Yes Integer Data source ID.
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.
UseVPC No Boolean Enable VPC.
RegionId No String Region.

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 String None.
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 Updating a Data Source

Input Example

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

{
    "DbHost": "0.0.0.0",
    "DbPort": "3307",
    "ServiceType": "{\"Type\":\"Own\"}",
    "DbType": "MONGODB",
    "DataOrigin": "",
    "Charset": "utf8",
    "Catalog": "",
    "DbUser": "username",
    "DbName": "name",
    "DbPwd": "password",
    "SourceName": "Test VPC",
    "VpcId": "vpcid",
    "UniqVpcId": "vpc-",
    "Vip": "",
    "Vport": "",
    "ExtraParam": "",
    "DataOriginProjectId": "",
    "DataOriginDatasourceId": "",
    "UseVPC": true,
    "RegionId": "gz",
    "ProjectId": 517,
    "Id": 134
}

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.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback