Querying Extensions
Function
This API is used to obtain extension information of a specified database.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
Constraints
This operation cannot be performed when the DB instance is in any of the following statuses: creating, changing instance class, changing port, frozen, or abnormal.
URI
- URI format
GET /v3/{project_id}/instances/{instance_id}/extensions?database_name={database_name}&offset={offset}&limit={limit}
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
Constraints
N/A
Range
N/A
Default Value
N/A
instance_id
Yes
Definition
Instance ID.
Constraints
N/A
Range
N/A
Default Value
N/A
database_name
Yes
Definition
Database name.
Constraints
N/A
Range
N/A
Default Value
N/A
offset
No
Definition
Index offset. The query starts from the next piece of data indexed by this parameter.
Constraints
N/A
Range
The value must be a non-negative number.
Default Value
The default value is 0, indicating that the query starts from the first data record.
limit
No
Definition
Number of records to be queried.
Constraints
N/A
Range
1–100
Default Value
100
Request
Response
- Normal response
Table 2 Parameters Parameter
Type
Description
extensions
Array of objects
Definition
Extension list.
For details, see Table 3.
total_count
Integer
Definition
Total number of extensions.
Range
N/A
Table 3 extensions element structure description Parameter
Type
Description
name
String
Definition
Extension name.
Range
N/A
database_name
String
Definition
Database name.
Range
N/A
version
String
Definition
Extension version.
Range
N/A
version_update
String
Definition
New version that the extension can be upgraded to. If the value of this parameter is different from that of version, the extension can be upgraded.
Range
N/A
shared_preload_libraries
String
Definition
Dependent preloaded library.
Range
N/A
created
Boolean
Definition
Whether the extension has been created.
Range
N/A
description
String
Definition
Extension description.
Range
N/A
- Example normal response
{ "extensions" : [ { "name" : "pg_cron", "database_name" : "db1", "version" : "1.0", "version_update" : "1.0", "shared_preload_libraries" : "pg_cron", "created" : false, "description" : "pg_cron access method - signature file based index" }, { "name" : "dblink", "database_name" : "db1", "version" : "1.2", "version_update" : "1.2", "shared_preload_libraries" : "", "created" : false, "description" : "connect to other PostgreSQL databases from within a database" } ], "total_count" : 2 }
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot