Domain name for API request: postgres.intl.tencentcloudapi.com.
This API is used to query database object list, such as the mode list in test database.
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: DescribeDatabaseObjects. |
| Version | Yes | String | Common Params. The value used for this API: 2017-03-12. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-bangkok, ap-beijing, ap-chengdu, ap-chongqing, ap-guangzhou, ap-hongkong, ap-jakarta, ap-nanjing, ap-seoul, ap-shanghai, ap-shanghai-fsi, ap-shenzhen-fsi, ap-singapore, ap-tokyo, eu-frankfurt, na-ashburn, na-siliconvalley, sa-saopaulo. |
| DBInstanceId | Yes | String | Instance ID. obtain through the api DescribeDBInstances. |
| ObjectType | Yes | String | Specifies the object type for querying. supported objects: database, schema, sequence, procedure, type, function, table, view, matview, column. |
| Limit | No | Integer | Number of items displayed at a time. default 20. value range 0-100. |
| Offset | No | Integer | Data offset, starting from 0. |
| DatabaseName | No | String | Describes the database the query object belongs to. this parameter is required when the query object type is not database. |
| SchemaName | No | String | Specifies the mode belonging to the query object. this parameter is required when the query object type is not database or schema. |
| TableName | No | String | Specifies the table belonging to the query object. this parameter is required when the query object type is column. |
| Parameter Name | Type | Description |
|---|---|---|
| ObjectSet | Array of String | Query object list. Note: This field may return null, indicating that no valid values can be obtained. |
| TotalCount | Integer | Specifies the total number of objects. |
| 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. |
This example shows you how to query the database list.
POST / HTTP/1.1
Host: postgres.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDatabaseObjects
<Common request parameters>
{
"DBInstanceId": "postgres-5cz25tr5",
"ObjectType": "database"
}
{
"Response": {
"ObjectSet": [
"postgres",
"postgres_bak_1715170243",
"user_database"
],
"TotalCount": 3,
"RequestId": "c90f7a9d-f519-4d2f-bb2f-e3966cd102b6"
}
}
This example shows you how to query the mode in user_database.
POST / HTTP/1.1
Host: postgres.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDatabaseObjects
<Common request parameters>
{
"DBInstanceId": "postgres-5cz25tr5",
"ObjectType": "schema",
"Limit": 2,
"Offset": 1,
"DatabaseName": "user_database"
}
{
"Response": {
"ObjectSet": [
"information_schema",
"pg_catalog"
],
"TotalCount": 2,
"RequestId": "bb6146b9-0c63-40ea-b89a-d83944805b79"
}
}
This example shows you how to query tables in the user_database database that belong to the user_schema mode.
POST / HTTP/1.1
Host: postgres.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeDatabaseObjects
<Common request parameters>
{
"DBInstanceId": "postgres-5cz25tr5",
"ObjectType": "table",
"DatabaseName": "user_database",
"SchemaName": "user_schema"
}
{
"Response": {
"ObjectSet": [
"users",
"users1",
"users2"
],
"TotalCount": 3,
"RequestId": "80530420-d73e-4a60-8149-93cf800220b9"
}
}
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 |
|---|---|
| FailedOperation.FailedOperationError | Operation failed. Please try again later. |
| FailedOperation.PreCheckError | Pre-check failed |
| OperationDenied.InstanceAccessDeniedError | You do not have the permission to operate this resource. |
| OperationDenied.InstanceStatusLimitOpError | This operation cannot be performed on an instance in this status. |
| ResourceNotFound.InstanceNotFoundError | The instance does not exist. |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback