You need to enable JavaScript to run this app.
RDS for PostgreSQL

RDS for PostgreSQL

Copy page
Download PDF
Managing databases
DescribeDatabases
Copy page
Download PDF
DescribeDatabases
Call the DescribeDatabases API to query a list of databases.​
Request type​
Synchronous request.​
Debug​
API Explorer
You can initiate calls online through API Explorer without paying attention to the signature generation process and quickly obtain the call results.
​
Request parameters​
​
Parameter​
Type​
Is it required?​
Example​
Description​
InstanceId​
String​
Yes​
postgres-ca7b7019****​
Instance ID.​
DBName​
String​
No​
testdb1​
Database name.​
tip​
When no value or an empty value is passed, all databases under the specified instance will be queried.​
PageNumber​
Integer​
No​
1​
The query offset of the current page. The default value is 1.​
PageSize​
Integer​
No​
10​
The number of records on each page. The value must be greater than 0 and no more than 1,000. The default value is 10.​
​
Response parameter​
​
Parameter​
Type​
Example​
Description​
Total​
Integer​
1​
Total number of databases.​
Databases​
Array of DatabaseObject​
Refer to the sample response.​
Database list.​
​
DatabaseObject​
​
Parameter​
Type​
Example​
Description​
CharacterSetName​
String​
utf8​
Database character set.​
Collate​
String​
en_US.utf8​
Sorting rules. Default value: C. Range:​
C, C.UTF-8, en_US.utf8, and zh_CN.utf8.​
CType​
String​
en_US.utf8​
Character category. Default value: C. Range:​
C, C.UTF-8, en_US.utf8, and zh_CN.utf8.​
DBName​
String​
db1​
Database name.​
DBStatus​
String​
Available​
Database state:​
  • Not available: not available.​
  • Available: available.​
Owner​
String​
testuser​
Database owner.​
tip​
Read-only accounts, super or normal accounts with DDL privileges disabled, cannot serve as the owner of a database.​
​
Example​
Sample request​
​
POST /?Action=DescribeDatabases&Version=2022-01-01 HTTP/1.1​
Content-Type: application/json​
Host: rds-postgresql.cn-beijing.volcengineapi.com​
X-Date: 20231002T101010Z​
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/rds_postgresql/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c6458****​
{​
"InstanceId": "postgres-ca7b7019****",​
"PageSize": 10,​
"PageNumber": 1​
}​
​
Sample response​
​
{​
"ResponseMetadata": {​
"RequestId": "2023080216495355289C8C837799FC33EF",​
"Action": "DescribeDatabases",​
"Version": "2022-01-01",​
"Service": "rds_postgresql",​
"Region": "cn-beijing"​
},​
"Result": {​
"Databases": [​
{​
"CType": "en_US.utf8",​
"CharacterSetName": "utf8",​
"Collate": "en_US.utf8",​
"DBName": "testdb1",​
"DBStatus": "Available",​
"Owner": "pg_rds_superuser"​
}​
],​
"Total": 1​
}​
}​
​
Last updated: 2026.03.31 10:45:18