Domain name for API request: cdb.intl.tencentcloudapi.com.
This API is used to query table column information of a designated database in a cloud database instance. It only supports primary instance and disaster recovery instance.
A maximum of 20 requests can be initiated per second for this API.
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: DescribeTableColumns. |
| Version | Yes | String | Common Params. The value used for this API: 2017-03-20. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| InstanceId | Yes | String | Instance ID, in the format such as cdb-c1nl9rpv. This matches the instance ID displayed on the TencentDB console. You can obtain it through the Query Instance List API. Its value is the InstanceId field in the output parameter. |
| Database | Yes | String | Database name. Obtain through the Query Database API. |
| Table | Yes | String | Name of the table in the database. |
| Parameter Name | Type | Description |
|---|---|---|
| TotalCount | Integer | Total number of eligible instances. |
| Items | Array of String | Returned database column information. |
| 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. |
POST / HTTP/1.1
Host: cdb.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTableColumns
<Common request parameters>
{
"InstanceId": "cdb-c1nl9rpv",
"Table": "COLUMNS",
"Database": "information_schema"
}
{
"Response": {
"RequestId": "6EF60BEC-0242-43AF-BB20-270359FB54A7",
"TotalCount": 20,
"Items": [
"TABLE_CATALOG",
"TABLE_SCHEMA",
"TABLE_NAME",
"COLUMN_NAME",
"ORDINAL_POSITION",
"COLUMN_DEFAULT",
"IS_NULLABLE",
"DATA_TYPE",
"CHARACTER_MAXIMUM_LENGTH",
"CHARACTER_OCTET_LENGTH",
"NUMERIC_PRECISION",
"NUMERIC_SCALE",
"DATETIME_PRECISION",
"CHARACTER_SET_NAME",
"COLLATION_NAME",
"COLUMN_TYPE",
"COLUMN_KEY",
"EXTRA",
"PRIVILEGES",
"COLUMN_COMMENT"
]
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| InternalError.UnknownError | Unknown error |
| InvalidParameterValue.InvalidParameterValueError | Invalid parameter value |
フィードバック